3 ms·
Compiler authors aren't doing this because they hate you, they're doing this because we want ever high performance. C and C++ didn't use to be like this because
by sweetjuly 3y ago
Compiler authors aren't doing this because they hate you, they're doing this because we want ever high performance. C and C++ didn't use to be like this because compilers were not capable of making the optimizations they can today.
- userbinator 3y agoMSVC and especially ICC got higher performance than GCC without exploiting UB, so how do you explain that?
- spacechild1 3y ago> MSVC Citation needed. This does not match my experience. > ICC If I'm not mistaken, this is largely because ICC uses unsafe math optimizations by default.
- userbinator 3y agoHere's some examples where ICC comes out ahead, often far ahead: https://keyj.emphy.de/compiler-benchmark/ https://keyj.emphy.de/compiler-benchmark/ https://iitd-plos.github.io/col729/labs/lab0/lab0_submissions/siy187504.pdf https://iitd-plos.github.io/col729/labs/lab0/lab0_submission... As for MSVC, my experience has been that it often generates smaller and slightly faster code than the others (except for ICC), but there's definitely some styles of code which it won't want to optimise.
- kaba0 3y agoThey definitely “exploit” UBs, any proof on the contrary?