3 ms·
0.01 is the resulting speedup in CPU usage (overall performance). It factors in the call count.
by rootlocus 8y ago
0.01 is the resulting speedup in CPU usage (overall performance). It factors in the call count.
- jazoom 8y agoThis is what I meant. I suspect the 0.01 probably encapsulates ALL these little sub-optimisations I decide on in a code base, rather than just this one variable swap. CPUs are a lot faster than most people realise. It's usually other things that slow down a program, not whether the programmer uses array.forEach or a basic for loop. Disclaimer: I do tend to use for loops a lot since they can be quite readable.