lua-users home
lua-l archive

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


> Well, I took a stab at it myself for some Sunday fun. It’s still very much work in progress, but the initial results seem promising.
> 
> Here are some benchmarking results for a large number of table reads/writes vs. array reads/writes.
> 
> [...]

Among other problems, your implementation slows down table access,
because every access first has to check whether the value is an array. A
fairer comparison would be of your implementation with tables against
tables in an unmodified Lua source. (Another caveat is that you are
testing accesses to constant indices, which is not the usual way arrays
are used.)

-- Roberto