lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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
> reference?

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.

D.

-- 
Daniel Silverstone                         http://www.digital-scurf.org/
PGP mail accepted and encouraged.            Key Id: 3CCE BABE 206C 3B69