you are viewing a single comment's thread
view the rest of the comments
[–] 4 points 1 year ago (2 children)

Tbf this mistake comes up so often I do wonder if cargo should have defaulted to release builds. It seems to be what beginners expect.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 1 year ago (1 child)

    Gcc, clang, msvc, and all the other compilers also don’t optimize by default. It’s very normal and very expected for the default build to not include optimizations

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 1 year ago

    Sure but you don't normally run GCC or Clang directly; you make, and that normally does optimise. I think a closer example is CMake which doesn't enable release mode by default.

    MSVC is usually run from Visual Studio which makes it obvious which mode is being used so the default doesn't matter so much.

    As for "all the other compilers", Go optimises by default. It does seem to be the exception though...

  • source
  • parent