lua-users home
lua-l archive

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


> For the sake of the poor newbies who do not realize that Pascal is
> being sarcastic: Roberto means "O(1) per item", of course.

In the same sake, expressing O() for space hardly makes sense. I don't
know any datastructure where this isn't 1 and suppose any other than 1
would be ridiculous. Expressed as constant factor I estimate Lua
varies between 1-1.5 (everything in array part, maybe add 1,5 for Lua
type headers), and 4 (*1,5) (everything in hash part, 2 for storing
keys, 2 for the hashtable just having load of 50%).