Rethinking intern() for python
Stephen J. Turnbull
turnbull at sk.tsukuba.ac.jp
Wed Apr 8 03:21:54 BST 2009
John Arbash Meinel writes:
> Going a bit further, I would bet that 90% of all strings are <32kB long.
> So you could change the ob_size member to be a 'short', and have the
> upper bit set indicate that there are extra bytes elsewhere to indicate
> the total length of the string. Or you could have everything but 0xFFFF
> be valid, and have that value indicate there is a different structure to
> check.
Dunno if it applies here (our rationale is GC, which compacts small
strings), but in XEmacs instead of having the logic in string, we have
a Lisp_String interface which is implemented internally as small
strings (malloc'd in pools) and big strings (malloc'ed individually).
More information about the bazaar
mailing list