lua-users home
lua-l archive

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


On 12/17/07, Mark Hamburg <mhamburg@adobe.com> wrote:
> But my concern on string speed has more to do with pushing table keys from C
> code. A relatively large amount of work goes into finding the matching
> existing string and this probably makes userdata less efficient than tables.
> Maybe short strings would help there as well.

the solution i'd like to see is something more like how Lua code does
it: string constants are interned at compile time and referenced by
integer constants.

but i think you'd end up with something like lua_ref(): runtime
computed indexes (instead of C constants), and at least one extra
table reference.

is there a better way?

-- 
Javier