Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

0.01 is the resulting speedup in CPU usage (overall performance). It factors in the call count.


This 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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: