lua-users home
lua-l archive

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


I was reading in the Lua book and thinking about implementing a stack for my
game and have a question.

If I add stuff to a list/queue/stack as done in the Lua book (page 94), when
I retrieve them does Lua need to traverse a linked list internally or are
all indices hashed and accessed directly?  If it's a linked list, does
adding new elements insert the tables at the head, tail or sorted order?
How do negative indices figure into this?

Thanks