lua-users home
lua-l archive

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


Mark Hamburg wrote:
You might try building a table mapping bytes to single character strings and
running string.byte through this table. This would essentially optimize
around the more general string interning logic Lua uses.

Thanks : allChars[strbyte(buff,n)] is about 4% faster than strsub(buff,n,n) in my test app. Not enough to be worth it in most cases, but it all adds up.

Adrian