by InfernalH · 14y ago · 0 comments
EDIT: and for Hash with h[i] = i, it's ~6Mb
Inlining integers in pointers by shifting up and adding 1 is a quite common trick though and I have seen it in more programming language implementations than MRI. I think at least some Prolog implementation and older versions of Spidermonkey (newer versions use a similar trick with doubles).