Lua还是Luajit在Apache Apisix中使用
将Lua或Luajit用于Apisix有什么好处? LUA 5.1,LUA 5.3和Luajit之间有什么关系?
What are the benefits of using Lua or LuaJIT for APISIX? What is the relationship between Lua 5.1, Lua 5.3 and LuaJIT?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Apache Apisix声称基于开放式(Nginx + luajit)。这是因为Luajit的性能要比LUA更好,并且有一个用于与C代码进行交互的FFI库。
来源: https://apisix.apache.org/blog/2021/08/25/why-apache-apache-apisix-chose-nginx-nginx-and-lua/#luajit-vs-go
Luajit基于Lua 5.1,Lua 5.3与其中的任何一个几乎没有关系。
有一个小的樱桃挑选了少数几个功能,从luajit中的5.2+重新实现,例如
bit
库库可以替换5.2的bit32
,但是Luajit在大多数情况下只是5.1的JIT实施,这使Lua 5.3奇怪的是。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
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'sbit32
, but LuaJIT for the most part is just a JIT implementation of 5.1, which makes Lua 5.3 the odd one out.我认为需要在Apache Apisix选择Lua写的开放式之前就需要提出要点。因此,也许这就是为什么您的问题受到负面评分的原因。
然后让我们回到问题,使用Lua或Luajit有什么好处。您可以参考此 link
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