2 ms·
> In the absence of an object table, become: traverses the heap in a manner similar to a garbage collector. The more memory you have, the more expensive become:
by kazinator 4y ago
> In the absence of an object table, become: traverses the heap in a manner similar to a garbage collector. The more memory you have, the more expensive become: becomes.
Well, yes, that should be "the larger the reachable object graph you have, the more expensive become: becomes". It's not necessary to do the substitution in areas of the heap that are garbage.
I would rather do it without any sort of object table, because then you can do things like make some string object become the fixnum 42 everywhere. :)
If you're doing something with object persistence, you can't be doing individual become operations object-by-object. There has to be a batch API for doing a mass become where you pass a dictionary of what is to become what, and the objects are traversed once to do all the rewrites.