What can I do to increase the performance of a Lua program?

后端 未结 5 613
灰色年华
灰色年华 2020-12-07 09:03

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

5条回答
  •  无人及你
    2020-12-07 09:32

    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)

提交回复
热议问题