[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C API question
- From: Daniel Silverstone <dsilvers@...>
- Date: Mon, 10 Jan 2011 12:14:19 +0000
On Mon, Jan 10, 2011 at 10:07:51AM -0200, Roberto Ierusalimschy wrote:
> Instead of a reference, can't you use the address of this small
> structure as the key to the callback (as a light userdata)? Or the
> address of a dummy 'ref' field, if you must keep more than one
I suggested that in a conversation a few of us were having recently (not on
list or IRC) and it was pointed out to me that pushing and then looking up a
light userdata in a table, may be more expensive than a rawgeti invocation.
Dunno if that becomes part of the argument one way or the other.
Daniel Silverstone http://www.digital-scurf.org/
PGP mail accepted and encouraged. Key Id: 3CCE BABE 206C 3B69