Skip to content

Comment on JavaScript – Array Direct Assignmentparent

Comments

They could all be reasonably unrolled, so it's probably something else. I expect the engine can more easily calculate the final required Array size and preallocate it upfront avoiding resize operation on each loop iteration. (which is anyway JS best practice when possible)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.