News for hackers. Stuff that matters.
Re:We used C++20 to eliminate a class of runtime bugs by pjmlp on Saturday January 15, 2022 @02:37AM (#29944502)
Certainly isn't a fact unless proven by examining the generated machine code.
Re:We used C++20 to eliminate a class of runtime bugs by jmgao on Saturday January 15, 2022 @04:29AM (#29945091)
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++.
Re:We used C++20 to eliminate a class of runtime bugs by maccard on Saturday January 15, 2022 @11:06AM (#29947405)
> 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 [1] https://build-bench.com/b/OH8qf9AgEB_l-BhANV5qP_uSCys

Re:We used C++20 to eliminate a class of runtime bugs by pjmlp on Saturday January 15, 2022 @03:48PM (#29950093)
ISO 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.