Re:WTF? Chromium (2016)
by cortesoft on Tuesday November 07, 2017 @06:53PM
(#15648876)
If 'for' and 'while' loops vary in speed that much between browsers, isn't that a defect in the browser? If one way is faster in chrome than firefox, why doesn't firefox change how it is doing the slower version?
[ Parent
| on HN ]
Because that would likely mean slowing down a different scenario. It's usually a trade-off, not a "defect".
The array sorting is a great example where the length of the array chosen or the pre-sort ordering can affect which browser is faster. No single browser may be able to claim the fastest for every scenario.