lua-users home
lua-l archive

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

> Try Ragel[1].
> [1]:

> Alternatively, re2c does the same thing: (for simple

Wow, the generated code is so branch-y!

What I do is compute the hash of the key (I usually use djb2) and use that in the comparisons. You can use Lua's internal hash if you don't mind changing Lua's source code and recompiling. Both techniques are discussed here: