[plt-scheme] Memory Use of Internal Representations
On Apr 9, 2009, at 10:12 AM, Erich Rast wrote:
> Another, somehow related question:
>
> (eq? (string->symbol "a") (string->symbol "a"))
> ==> #t
>
> Can I conclude from this that the two interned symbols occupy the same
> memory (plus constant overhead like a pointer) in Mzscheme? If yes, is
> there a similar memory-savvy encoding for strings?
It used to be called "interning" (mapping it all to an "oblist" --
historical name) when people knew that Lisp existed. Now it's called
"fly weight" pattern or something like that, because the OO community
finally rediscovered it. -- Matthias