On Sun, Nov 7, 2010 at 10:49 AM, Drake Wilson
<drake@begriffli.ch> wrote:
Quoth Shawn Fox <shawnkfox@gmail.com>, on 2010-11-07 09:48:23 -0600:
> Rather than using upvalues, I store the metatable in the registry.
Careful where you store that ref. If you're using process-global space,
you've just broken loading your library into multiple Lua states in the
same process.
Excellent point... for my purpose I'm not building a generic module and there is only one Lua state. For creating a generic module, using upvalues seems to be the best way to improve performance of type checking.