I asked a question about Lua perfromance, and on of the responses asked:
Have you studied general tips for keeping Lua performance high? i.e. know tab
Keep tables short, the larger the table the longer the search time. And in the same line iterating over numerically indexed tables (=arrays) is faster than key based tables (thus ipairs is faster than pairs)