3 ms·
i don't think any of these will greatly, if at all, increase performance. they are of interest for people that are a) obsessive about program size or b) want t
by zabzonk 4y ago
i don't think any of these will greatly, if at all, increase performance. they are of interest for people that are a) obsessive about program size or b) want to fit the compiled code into some very small storage device, such as a rom.
- nrclark 4y agoProgram size has a lot of interaction with performance, by way of your CPU's L2/L3 cache. If your program is too large, you get more cache misses when branching around. Frequent cache misses have a _huge_ effect on your code's overall performance, and can completely negate any of the wins you get from loop unrolling or other optimizations. This effect is very pronounced on small armv7l/aarch64 CPUs, which usually have much smaller caches than a desktop CPU. You can even see it on laptop CPUs too. It's impossible to know where exactly your size cutoffs are, because they depend a lot on what else is running in your system (and CPU core allocation, etc). But they 100% exist, for any program on any system. If your whole program can fit into your CPU cache, you'll see a big performance difference vs having to fetch it from RAM all the time.
- charcircuit 4y agoI never said "performance benchmark." By benchmark I meant you take a few programs like Chromium, clang, etc and measure how much savings each option gives.