lua-users home
lua-l archive

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


Thanks for the tip!

Seems like I got another ~4% improvement with those flags! (although I've enabled globally)
What are they doing in the interpreter? Better jumping when executing the lua instructions?

Custom allocator also benefits me on Linux, the results I've shown were all on linux.
I've managed to bundle my Lua interpreter with this allocator https://github.com/mjansson/rpmalloc
Seems to work fine and it's much more simple to use (a single C file) and performs the same as mimalloc,
and much faster than my system's standard malloc.
I think it could be even faster if the thread safety was removed from that allocator.
All good allocators in C that I find out there are thread safe and I don't see much need in the Lua case.

I've also experimented porting the LuaJIT's allocator to Lua 5.4 (was quite easy to do),
and it performed worse than mimalloc or rpmalloc for my use case.

Regards,
Eduardo Bart


Em sex., 21 de ago. de 2020 às 10:40, Dibyendu Majumdar <mobile@majumdar.org.uk> escreveu:
With gcc, when using using computed goto, it seems following options
help: -fno-crossjumping -fno-gcse.

I found that the benefits of a custom allocator depend on the
platform. Default malloc/free on Linux seems very good - but on MacOSX
a custom allocator is measurably faster (you can try the binary trees
benchmark for this).

Regards