[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: A proposal for faster userdata type checking
- From: "Alex Davies" <alex.mania@...>
- Date: Fri, 29 Feb 2008 07:23:58 +0900
Does anyone else think it would be nice to simply have a byte tag stored
with each userdata? Couldn't be quicker to check, and it'd have the added
benefit of allowing custom metatables per userdata object. (Only useful in a
few cases, but still).
----- Original Message -----
From: "Taj Khattra"
On Thu, Feb 28, 2008 at 7:57 AM, Chris <email@example.com> wrote:
fine but luaL_checkudata adds a significant amount of overhead when
making heavy use of calls that need to check userdata types (which is
very important when creating "safe" APIs).
did you compare the performance of storing the metatable in the C function
environment instead of the registry?
i seem to recall mike pall posting some performance numbers comparing
the two approaches, but google is failing me at the moment.