3 ms·
> 1. not exactly, you're now doubling your allocations as you're allocating a native object which has to create sub-structues representing the guest object Tho
by ori_b 8y ago
> 1. not exactly, you're now doubling your allocations as you're allocating a native object which has to create sub-structues representing the guest object
Those sub structures can live within the same allocation. And in many cases, the object passed to the interpreter can be the undecorated native object.
> 2. the GC of the host language doesn't necessarily match what you want for the guest
It's almost certainly better than recounting or naive mark and sweep, which is what you get when someone reimplements a GC for an interpreter.