2 ms·
That's the usual approach for advanced object systems with a copying garbage collector. I do the very same. The class pointer is not unique because it might cha
by rurban 9y ago
That's the usual approach for advanced object systems with a copying garbage collector. I do the very same. The class pointer is not unique because it might change, so just a random unique id is stored, with 0 reserved as unknown. The lookup could be done per hash, but mostly it's just praying. Similar for symbols and unmutable strings, the id's just need to be unique.
In this case it's just the class.