lua-users home
lua-l archive

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

On Mon, Nov 25, 2013 at 12:19 PM, John Hind <> wrote:
> Having the existing single element table.remove and table.insert encourages users to write [inefficient] code like:

Well, no language is safe from inexperienced users.  It's only really
a problem if the resulting program is too slow for its purpose.

> t = {}
> for i=1, 10000 do t[i] = i end
> for i=11, 9899 do t[i] = t[91+i] end
> for i=10000, 9900, -1 do t[i] = nil end

What is the magic number 91 doing here? I'm curious....

steve d.