3 ms·
A lot of the time non-optimized builds are fine. Unfortunately C (or rather C implementations) advertise the opportunity to make your code "as fast as possible"
by lmm 10y ago
A lot of the time non-optimized builds are fine. Unfortunately C (or rather C implementations) advertise the opportunity to make your code "as fast as possible" assuming you haven't made any mistakes, and too many programmers think "of course I want my code to run as fast as possible, and of course I don't make mistakes".
- wonko1 10y agoI think it's partly that if you're not looking for speed improvements then C, as a language, begins to look less attractive. There are certainly safer alternatives, but not faster ones. I'd probably agree though, in most cases users don't need the fastest builds (most OS tools). It would be interesting actually to be able to enabled optimized versions of functions as a runtime flag. But I've never seen that done.
- hermitdev 10y agoThis is one of the reasons I insist on my C/C++ code compiling with "-Wall -Wextra -Werror" and a few other switches.
- nwmcsween 10y agoNo, there needs to be a article on -Wall -Wextra and -Werror being harmful, these are metaflags that: 1. Vary between compiler versions. 2. Vary between compiler implementations. 3. Often contain somewhat useless warnings (Wparentheses) that can change with changes in 1. or 2.