←back to thread

498 points azhenley | 1 comments | | HN request time: 0.218s | source
Show context
storus ◴[] No.45772068[source]
I had enormous fun optimizng C++ via self-modifying assembly to squeeze the utmost performance of some critical algorithms, and now this drive towards immutable everything feels like cutting my hands and legs off and forcing me to do subpar engineering.
replies(2): >>45772538 #>>45772766 #
1. no_wizard ◴[] No.45772766[source]
Compiler optimizations make up for it, usually. Thats been my experience at least.

An important thing to keep in mind is just how far compilers have come over the least 40 years. Often, with immutable languages, they can do extremely efficient compile only optimizations because of said guaranteed immutability by default.

Its not true in every case, of course, but I think for most situations compilers do a more than good enough job with this.