[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ways to avoid (or speed up) luaL_checkudata() in LuaJIT2?
- From: Mike Pall <mikelu-1011@...>
- Date: Sat, 6 Nov 2010 12:51:58 +0100
Leo Razoumov wrote:
> On Sat, Nov 6, 2010 at 06:12, Mike Pall <mikelu-1011@mike.de> wrote:
> > [Actually the internal userdata methods in LuaJIT have a much
> > faster check, using a 16 bit udtype field in every userdata. See
> > io_tofilep() in lib_io.c. Alas, this mechanism is not available
> > for external methods and it might change anytime.]
>
> what happens if 16 bit udtype field overflows?
This is for _internal_ userdata types of the LuaJIT core.
Currently there are exactly _two_ kinds: regular userdata (what
you get with lua_newuserdata) and file handles. I do not
anticipate to need more than a handful of these in the future.
--Mike