[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Interfacing lua with C
- From: "Wim Couwenberg" <w.couwenberg@...>
- Date: Fri, 17 Jan 2003 01:35:05 +0100
Hi,
> How are
> table lookups implemented in lua.I was thinking wether it would be
> (significantly)faster to store the info about cvars in an internal C
> hash table for the lookups.Would there be any difference?
Lua uses chained hash tables where hash values that are in their right spot
take precedence over "misplaced" hash vales (and will relocate those if
necessary.) Moreover, space usage has been neatly implemented (grow if 3/4
full, shrink if less than 1/4 full.) All in all, Lua tables are pretty
efficient.
Bye,
Wim