4 ms·
Optimizations in C++ compilers: a practical journey
- macgyverismo 11mo agoLovely article, I am amazed at the lengths compilers go through to get the best performance. Thanks for writing this! Reading the part about pure functions (including the extension [[gnu::pure]]) made me feel that this is a part where the C++ default is actually wrong. Not just because it could be better/hindsight/other languages have it/etc. but because it is in conflict with its own motto, don't pay for what you don't use. I really hope I can enable a compiler flag some time in the future that would make my variables const, and my functions pure by default.
- gnabgib 11mo ago(2019) Popular in 2020 (102 points, 20 comments) https://news.ycombinator.com/item?id=23822044 https://news.ycombinator.com/item?id=23822044