3 ms·
> -O3 produces much faster code than -O2 Also “-Ox gives similar results all the time”. Any optimisation is a gamble, some of them quite unsure gambles. Differ
by dspillett 2y ago
> -O3 produces much faster code than -O2
Also “-Ox gives similar results all the time”. Any optimisation is a gamble, some of them quite unsure gambles. Different cache sizes and management strategies between processing units mean that what might be a small benefit for one could be a detriment when the code is running on another, and even if you specifically tune the optimisations for a given set of chips you are at the mercy of the incoming data which could invalidate any educated guesses made about branch likelihood and so forth.