Multiple replies pointing out this example is V8 behavior (true ty), but all fast JS interpreters have unintuitive performance characteristics in some cases. The point is, measure measure measure, using the realest benchmark you can. Never say "this *should* be faster", measure!