lua-users home
lua-l archive

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



> code. Interestingly, though, the NEWTABLE opcode in Lua bytecode has
 :
Correction for the record: like lua_createtable, not lua_newtable.

Thank you very much for confirming what can be done.

In the old Lua there ware different constructors: (3), [a,b,c], {a, b,c}; first to create a table of specified size, second to create a table with the array part, third to create a table with the hash part filled as specified.

For the new Lua 5.4, has somebody already proposed/discussed a possible way to annotate the constructor {} so that it creates a table with specified size?

Or it was deemed irrelevant because amortized cost of rehash is small and therefore does not matter? (I agree on this - but I want to design an application which has no big "pauses" caused by rehash of big tables)

   Andrea

--
Andrea Vitali