3 ms·
> I build things for a living and I like it when the code I specify is the code that's generated. Okay, then specify -O0 and enjoy your dumpster fire performan
by jmgao 5y ago
> I build things for a living and I like it when the code I specify is the code that's generated.
Okay, then specify -O0 and enjoy your dumpster fire performance.
- overgard 5y agoTo be fair, it's usually like 5% slower. But I also don't usually have control over the flags if I'm writing a library.
- umanwizard 5y agoI’d be curious to know what benchmarks you’re using on which O0 is only 5% slower. I suspect your program must be almost entirely IO-bound, if this is the case. In that case, Python, Ruby, or shell probably wouldn’t be much slower either.
- overgard 5y agoWriting games, I've rarely seen the optimizer do anything of substantial use.
- SAI_Peregrinus 5y ago-O0 doesn't necessarily change this. After all, optimizations aren't allowed to violate the spec (if they do, they're buggy). So any code that can be output by an optimizing compiler could (in principle) be output by a non-optimizing compiler.