Try the same test in Firefox, IE, Node etc? If the test you’ve done is correct, then I assume some optimisation within Chrome’s JS engine converts the basic code to something highly optimised under-the-hood. Note this is a problem with performance advice about hand-optimising JS, because it’s not like C (or C++, Java, etc). Not saying this is the case here, but whether one algorithm [written in JS and running in a browser] is more performant than another is highly dependent on JS engine/engine version. All the Ecmascript spec describes is what any given algorithm has to do for each step, it doesn’t tell the implementer (in this case Google or Chromium) how to do it.