3 ms·
This is a worthless statement. Do you examine all of your generated machine code to ensure that it generates correct code? Any compiler that you cannot trust to
by jmgao 5y ago
This is a worthless statement. Do you examine all of your generated machine code to ensure that it generates correct code? Any compiler that you cannot trust to inline 3 for strlen("foo") is not one you should trust to compile anything, let alone modern C++.
- maccard 5y ago> Do you examine all of your generated machine code to ensure that it generates correct code? (not OP). I examine the output if someone tells me it's slower, or if I care about performance. I did a very rough benchmark which says in this case they're equivalent [0], however that's not necessarily representative of the places it's called in. There's definitely a compile time overhead though [1]. On my current project there's ~20k files. On an 8 core machine (as an example), adding 150ms per file would add 7 minutes onto a clean build (before optimising the builds). [0] https://quick-bench.com/q/LBarCDIigwpmXcwZSx-RgV2x4_4 https://quick-bench.com/q/LBarCDIigwpmXcwZSx-RgV2x4_4 [1] https://build-bench.com/b/OH8qf9AgEB_l-BhANV5qP_uSCys https://build-bench.com/b/OH8qf9AgEB_l-BhANV5qP_uSCys
- pjmlp 5y agoISO C++ abstract machine and what a random C++ compiler generates out of it, don't require at any moment the realisation of your assertion. So you either validate it actually takes place or believe in fairy tales.