[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: really fast metatable lookup in C
- From: Adrian Sietsma <adrian_groups@...>
- Date: Sun, 19 Dec 2004 00:01:07 +1000
Asko Kauppi wrote:
Based on the enum/int32 implementation for Lua, I'm in the need for an
extremely fast integer -> metatable lookup on the C side.
Currently, I use 'glua_meta_nn' keys into the registry, but there must
be a better way.
Could I, say, have a set of some 1000 :) virtual indices s.a.
'REGISTRYINDEX' all for my own need. I could maintain that range by
myself (store table references there, in neat order) as long as it would
be sure no-one else is dealing with those 'slots'.
Does Lua already provide this, or could such a range be considered for
if you are on the c-side, could you use upvalues ?
(push them all at lib init time maybe ?)
is there a limit to the number of upvalues allowed ?