[plt-scheme] Memory Use of Internal Representations

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Apr 9 17:33:19 EDT 2009

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



Posted on the users mailing list.