lua-users home
lua-l archive

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




Le mar. 26 mai 2020 à 23:19, Andrea <andrea.l.vitali@gmail.com> a écrit :
Can Lua team add table.create(narray,nash) to the table library in Lua 5.4? Does this make sense?
 
I proposed somethine else: table.set({paramers},table) with table (possibly nil to set the defaults in the current environment, for normal table creation)
It would allow different storage/sorting/lookup models for tables, including the maximum number of hash (also used for rounding up table growth to a multiple of this value ,without necessarily having a growth or reduction factor of 2 as it is very space-inefficient today; only size*2 or size/2).
The current model really uses too much memory (Lua uses a lot of tables, so it is a problem for server-side applications with many clients running their own scripts, and for using Lua on small devices), and its "fast hashing" is too much optimistic, when various applications have more requirements (including for security/privacy on shared application servers)