4 ms·
Interesting. I suppose it depends on what you're doing, but I typically see the speed taken getting cut to half vs -O and -O2 in C/GCC, so things will typically
by orib 18y ago
Interesting. I suppose it depends on what you're doing, but I typically see the speed taken getting cut to half vs -O and -O2 in C/GCC, so things will typically run at 50% the speed. Flipping around between -O, -O2, and -O3 don't make much difference though. The big thing to note is that once you start enabling some major optimizations (doing good register allocation, strength reduction, loop-invariant hoisting, and tail-call elimination) you've already got 95% of the optimization you're going to get. The rest is far less important.
This, of course, won't matter if you spend most of your time in I/O or libraries.