It looks like Defold uses lua 5.1. The problem for me is that lua 5.2 is the first version that offers bitwise operators. Between this and the fact that I can’t add my own C library, I’m starting to feel a bit handcuffed with Defold. For performance purposes, I need to be doing some work at the level of bits and bytes. Any suggestions?
We use LuaJIT on most platforms (which include bit operations), and we have an issue to add the bitop library to platforms where we use vanilla Lua (issue DEF-1742).
There is plans to add the possibility of C extensions, but I don’t know when they will be available.
(And hopefully coming in next stable, there is some further optimisations for desktop builds, DEF-1861.)
What areas are you having performance issues with?
LuaJIT is highly performant and the Defold team pour a lot work into the engine itself being high performant as well.
Thanks. The engine itself does have great performance - that’s one of the things I really like about it! Our studio designs learning and entertainment games around the structure of natural language, so we need to implement various NLP algorithms that are rather computationally expensive.
For what it’s worth, having C extensions would probably make this the go-to engine for us.
In this Game Scripting Languages benchmark you can see performance of LUA:
(As I understand defold use luajit from second place of this table. Am I right?)
This is correct, I’m not sure what is actually tested in those benchmarks though, but LuaJIT is very nice Lua compiler indeed.