Re:Never create Ruby strings longer than 23 characters
by ben0x539 on Wednesday December 11, 2013 @11:03AM
(#6888273)
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.
[ Parent
| on HN ]
Re:Never create Ruby strings longer than 23 characters
by throwaway0094 on Wednesday December 11, 2013 @01:09PM
(#6889360)
Hm, ok. Still, at some level fragmentation is eating gobs of space even if correct for the "average".