lua-users home
lua-l archive

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




On 12/22/06, Ivko Stanilov <ivko@haemimontgames.com> wrote:

I think you could add a mininum table allocation size (or minumum
allocated entries at table creation) macro in 'luaconf.h'. Because
we're not limited by memory constraints, we'd happily set this
value to 8 or 16 if it existed, so we can save time from
reallocations. But I'm not so sure about this, since I guess we could
just optimize our code ;)

Ivko


You can specify an initial size in the lua_createtable C API function.  Perhaps a custom C function calling this for new tables would be a quick and easy solution.

--
Mike