2 ms·
I'm sure the people who made those optimisations took very good benchmarks before they made them. And, most likely, they do work under the right circumstances.
by swombat 18y ago
I'm sure the people who made those optimisations took very good benchmarks before they made them. And, most likely, they do work under the right circumstances.
However, to make a generalisation/optimisation of my own, in 99% of the cases, trying to write overly clever code like that is a waste of time and does not result in faster code - though it does obscure your code and make it harder to optimise later when you actually need to. It would probably be better for 90+% of the people who will stumble on this article to never have read it.