News for hackers. Stuff that matters.
Re:How JavaScript works: inside the V8 engine by inglor on Monday August 21, 2017 @01:39PM (#15066167)
No, this is not true. Static allocation is always faster than dynamic allocation _if_ you know you're going to use it.

I think what they're suggesting here is not to dynamically allocate large arrays - it's to allocate "as you go" (increase when you need to).

For example, bluebird is very allocation averse - but we do actually grow a few things as we go (like the queue) if we didn't allocate enough ahead of time.

There are no comments on this comment yet.