1) I'd like to see `a` (note the backticks) be a run-once form of
string.byte('a') -- a single-character transform that happens at
compile-time. When you use string.byte() in a loop it'll be run every
time, and I argue that creating a local for this purpose is difficult
to name and largely a waste of a local.
2) I'd like the __index of the string type to change so if called with
a numeric key it'll do this [essentially] in a C function: ('cat')[3]
-> string.byte('cat', 3, 3) This could be done more cheaply in C than
with the additional call overhead of a string.byte() in Lua for
tight/large loops.
It's very costly to create a lot of single-character Lua strings that
get hashed and then quickly discarded after a comparison -- this is
what I've come up with to help: