LuaJIT2 version of Mudlet

Post Reply
User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

LuaJIT2 version of Mudlet

Post by Vadi »

This is a version of Mudlet linked to luajit, instead of lua, to be used with the latest LuaJIT2 betas. Advantages are that it's faster yet compatible with the stock Lua VM, comes with a bitwise library and since beta6, has FFI.

Steps
1) download and install latest luajit2 beta.
2) get the patched source (git clone git@github.com:vadi2/Mudlet.git) or update (git pull) if you already have the source
3) compile and run Mudlet as you'd normally do

Notes
This is still very new and LuaJIT2 is still in beta; so this is not intended for the common users since there might be complex issues. Don't try running this if you aren't experienced in compiling, please.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: LuaJIT2 version of Mudlet

Post by tsuujin »

can we get this in the form of a patch for the main branch, or is it too complex? Also, which version of the source have you patched? Latest 2.*?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: LuaJIT2 version of Mudlet

Post by Vadi »

It's going along with the latest. Patching I'm not sure, but give this one a go.
Attachments
0001-converted-to-unix-line-endings.patch.7z
(1.63 MiB) Downloaded 413 times

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: LuaJIT2 version of Mudlet

Post by Vadi »

Let me know when you've got it running (I still recommend to just use this branch because I'm not sure how to generate a patch of the lastest mine vs latest origin master, yet).

There is a noticable performance impact as observed by S:, but it doesn't seem to be that huge. Maybe 20% top? Seems most of the time is spent in the trigger matching. This was tested when in a non-combat situation though, as far as curing systems go.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: LuaJIT2 version of Mudlet

Post by tsuujin »

I'll probably compile and test tomorrow. Sick kids and so forth today.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: LuaJIT2 version of Mudlet

Post by Vadi »

I'd like to create a makefile option of 'make luajit' that will use the luajit as main interpreter for compliation, such that this patch can be merged into the main branch without affecting anything (and being optional).

Post Reply