You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
今天,我把 Lua 5.5 beta 合并到分支 lua55 上:https://github.com/cloudwu/skynet/tree/lua55
希望大家尝试一下,看在自己的项目中有没有问题。
这项工作主要是重新 patch lua 5.5 支持共享 table 和共享函数 proto 。
因为 Lua 5.5 官方支持在创建 state 时传 seed ( 共享函数需要不同的 state 保持一致的 string hash seed),所以这个 patch 可以稍微简化一点(对原版 lua 的修改更少)。
Lua 5.5 对 gc 做了进一步优化,在分代 gc 的主收集步骤采用了分步收集,这应该可以减少 gc 停顿。我认为对改善服务器的性能非常有价值。另外 Lua 5.5 优化了数组的内存占用,这对减少服务器内存使用也是一个好消息。
所以更新到 Lua 5.5 非常值得尝试。
Lua 5.5 增加了 global 关键字,它可以增进 Lua 代码的可维护性。但目前并未在 skynet 中使用。在 5.5 正式发布后,我会逐步修改 skynet 的代码,利用上它。
Beta Was this translation helpful? Give feedback.
All reactions