3 ms·
Compiler optimisations can be very nuanced, especially in C. You might find that changing the code very slightly, or even just using a different combination of
by Sean1708 10y ago
Compiler optimisations can be very nuanced, especially in C. You might find that changing the code very slightly, or even just using a different combination of compiler options, can speed up the code a surprising amount.
Edit: Looks like using -Ofast instead of -O3 makes a big difference: https://news.ycombinator.com/item?id=13634119 https://news.ycombinator.com/item?id=13634119