Hacker News new | ask | show | jobs
by avaer 3386 days ago
You're right, which is why one of the fundamental optimizations in a modern Javascript engine is inferring static memory layouts for your objects. Another is getting rid of unnecessary allocations to reduce the need for GC.
1 comments

> inferring static memory layouts for your objects

I'm deeply suspicious that you'll do better than something purpose built. Things like arena allocators for levels. Knowing how your scene-graph and animation traversal are really hard to get right and without direct control over SoA vs AoS and the like I don't see how you get within a factor of 10 to something written in native.