Lua还是Luajit在Apache Apisix中使用

发布于 2025-02-04 18:41:50 字数 63 浏览 3 评论 0原文

将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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

じ违心 2025-02-11 18:41:50

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

LUA 5.1,LUA 5.3和Luajit之间有什么关系?

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

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.

旧情别恋 2025-02-11 18:41:50

我认为需要在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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文