3 ms·
Is this a property of JavaScript or the engine running it? This feels like something a sufficiently-smart™ closure implementation should be able to prevent.
by cobbal 2y ago
Is this a property of JavaScript or the engine running it? This feels like something a sufficiently-smart™ closure implementation should be able to prevent.
- Jasper_ 2y agoThis is an artifact of V8's GC. Effectively, largeObject and smallObject are tracked together, as a unit. Splitting it out into two separate records increases average memory usage. They keep saying they want to fix it eventually, but it's been this way for 10+ years at this point. You really do have to know the quirks of what you're targeting.
- Dylan16807 2y ago> sufficiently-smart™ Well, the reference lua implementation handles this case fine, and it's a solid but not at all smart™ codebase.