Skip to content

Comment on Never create Ruby strings longer than 23 charactersparent

Comments

I don't think these strings ever sit on the C stack, except maybe if some C code/extension is being really clever. The standard representation for variables is a tagged pointer as far as I know, so I would assume that is all that goes on the stack. This optimization probably just saves another level of indirection.

Hm, ok. Still, at some level fragmentation is eating gobs of space even if correct for the "average".

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.