What are the benefits of using Lua or LuaJIT for APISIX? What is the relationship between Lua 5.1, Lua 5.3 and LuaJIT?
-
https://luajit.org/performance_x86.html – Luke100000 Jun 06 '22 at 17:34
2 Answers
Apache APISIX claims to be based on OpenResty (Nginx + LuaJIT). This is because LuaJIT has better performance than Lua, and has a FFI library for interacting with C code.
Source: https://apisix.apache.org/blog/2021/08/25/why-apache-apisix-chose-nginx-and-lua/#luajit-vs-go
What is the relationship between Lua 5.1, Lua 5.3 and LuaJIT?
LuaJIT is based on Lua 5.1, and Lua 5.3 has very little relation to either of them.
There is a small cherry-picked handful of features backported or re-implemented from 5.2+ in LuaJIT, for example the bit
library is there to replace 5.2's bit32
, but LuaJIT for the most part is just a JIT implementation of 5.1, which makes Lua 5.3 the odd one out.

- 274
- 1
- 7
I think a point needed to be claimed before that the Apache APISIX do choose the Openresty which Lua wrote. So maybe this is why Your question was scored negatively.
Then let's return to the question, What is the benefit of using Lua or Luajit. You can refer to this link

- 55
- 1
- 10