-
Notifications
You must be signed in to change notification settings - Fork 33
Optimize performance #21
Comments
Love2D uses LuaJIT. According to this page pairs() is not JIT compiled. So any instruction path that uses pairs() would not benefit from the performance improvements of the LuaJIT runtime. Looking through the code, I believe there are some usage of pairs() that could be replaced ipairs(). Doing so would be a first step towards improving overall performance. |
Thx for the advice and the website, it looks really helpful. |
LuaJIT v2.1 has a built-in sampling profiler. One of the output formats it supports looks pretty neat:
|
Wow, we didn't know about that, thanks a lot. @Nukesor and me are still looking for some time to throw at this ticket, if in the meantime you find out more feel free to open a PR or comment again :) |
It also has a feature where you could label sections of code as zones for an easier to read profiler output. E.g. a game could make use of an "AI" zone, a "PHYS" zone, etc. |
http://lua-users.org/wiki/ProfilingLuaCode could be of help.
The text was updated successfully, but these errors were encountered: