lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Excerpts from Patrick Donnelly's message of 2014-09-03 22:44:05 +0200:
> >> http://lua-users.org/wiki/FastStringPatch
> >> I found this nice idea, but why luajit doesn't use this optimization?
> > Lua 5.2 does. I plan to get this in LuaJIT working, as it paves the way for
> > other funky hacks (mutable strings..).
> I believe you're thinking of the other optimization in Lua 5.3-alpha
> where long strings ( > LUAI_MAXSHORTLEN) are not interned in the
> string table?

Yes thats indeed the case, kinda assumed it's the do-not-intern-large-strings
without following the link, as string atoms seem impractical, IMO:

LuaJIT TValues are 8 bytes and more picky about contents because
of the NaN trick (If I'm counting right, about 5 byte + \0 strings might
be possible). Having to special case yet another tag for this probably
does not make it worthwhile.