Would you guys mind if I distribute MCServer + LuaJIT binaries?
#11
Still, I'd like to see a plugin that is too slow using the current Lua engine.
Reply
Thanks given by:
#12
I'm especialy curious if Lua generators are faster using LuaJIT, because currently I get around 30-40 ch/s with my FloatingIslands generator. If I'd suddenly get 100 ch/s then that would allow much more complex and advanced to be written in Lua.
Reply
Thanks given by:
#13
If there's alot of looping and number manipuation that goes on in the generator side, I wouldn't be surprised if you got double that. Smile

So basically, here's what I did:

First, I built the server normally to generate Bindings.cpp and Bindings.h as they refused to generate after the patch.

Then in CMakeLists.txt in the root source folder, I changed it to this:

# Include all the libraries:
add_subdirectory(lib/jsoncpp/)
add_subdirectory(lib/zlib/)
add_subdirectory(lib/tolua++/)
add_subdirectory(lib/sqlite/)
add_subdirectory(lib/SQLiteCpp/)
add_subdirectory(lib/expat/)
add_subdirectory(lib/luaexpat/)
add_subdirectory(lib/libevent/)

(The Lua entry was removed.)

Next I did deleted the lua folder in src/lib/ and lib/lua/

Then I downloaded LuaJIT libs from my Ubuntu repo.

Then, assuming that you ran cmake already, I went into src/src/CMakeFiles/MCServer.dir/link.txt.
There should be 2 flags under there that link to Lua libraries (-llua). I changed these to the file path of the static libs of LuaJIT installed earlier.

Now in src/lib/tolua++/CMakeFiles/tolua.dir/link.txt, do the same thing and replace "-llua" with the abolute filepath of the static LuaJIT lib.

Then go back and run make, it should compile relatively smoothly. Smile
Reply
Thanks given by:
#14
And I just tried your FloatingIslands generator on my Odroid XU3. I got about 3.5ch/s vanilla and 9-12ch/s JIT. Big Grin
Reply
Thanks given by:
#15
That sounds nice.
Also: http://luajit.org/performance_x86.html
Reply
Thanks given by:
#16
Nice that's around 2.5 times faster ;D Still that is pretty slow, so we might want to do some measurements on a different computerTongue
Reply
Thanks given by:
#17
Tested it on an Intel Core i3-4000U, got 14ch/s vanilla, 22ch/sJIT. Big Grin

Also, It seems that when creating Bindings.cpp and Bindings.h, according to this FAQ, something needs to be adjusted:
"attempt to index global 'arg' (a nil value)"

http://luajit.org/faq.html
Reply
Thanks given by:
#18
I'm a bit concerned that there is only an explicit list of supported platforms, it doesn't compile for others (http://luajit.org/faq.html , last-but-one item). This might be a problem, since we do support all the obscure platforms that have a C++11 compiler available.
Reply
Thanks given by:
#19
If this could be added as a compile-time switch, we wouldn't have that problem.
But, i'm don't know how doable is that.
Reply
Thanks given by:
#20
That would be nice. Add the option as a CMake flag or something? Big Grin
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)