lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Sep 28, 2016, at 5:44 AM, 云风 Cloud Wu <> wrote:

Dane Springmeyer <>于2016年9月28日周三 下午2:19写道:
Compared to lua 5.2.4, for my usecase I've noticed that 5.3.0 uses roughly 2x the amount of memory and is 1.5x slower. And Lua 5.3.3 is again 2x slower and uses > 4x the amount of memory than 5.3.0.

Do you have test lua 5.3.1 ? I guess the main change between 5.3.1 to 5.3.0 is lua_pushstring (and lua_getfield/lua_getglobal), Lua 5.3.1 add a string cache for C string.

Yes, I also tested with lua 5.3.1. The performance and memory usage was similar to 5.3.0. My complete debugging notes are here: which show one run with lua 5.3.1. I don't expect those to be understandable to anyone, just sharing nonetheless. If I have a test case that others can run I will post back.

Or you can change all the lua_pushstring to lua_pushlstring in your luabind, and then see the difference.

But I have no idea about 4x memory used, it's strange.

I agree, very surprising!