lua-users home
lua-l archive

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


Table lookups are PDQ, until you measure the performance one
never knows. I think the strategy is reasonable. One option is to
wait until the Lua conference is over and get some input from
those more knowledgable than me.

DB

Doug Currie wrote:
I will try this...

1. Create a table in the registry owned by the loadable library

2. Enter contexts in this table keyed the the thread address (L)

3. Cache the most recently used context in the library to avoid the
hit of two table lookups for very operation. Caching is safe per:
http://thread.gmane.org/gmane.comp.lang.lua.general/21690/focus=21706