LuaJIT 2

A category for whatever! Can be Mudlet-related or offtopic.
Post Reply
User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

LuaJIT 2

Post by Vadi »

So now that LuaJIT2 beta 5 supports x64, I decided to for a test replace the vanilla vm in Mudlet with it. It was frankly very easy to do - only two lines of code in src.pro to link to luajit instead of lua:
Code: [show] | [select all] lua
LIBLUA = -L/usr/local/lib -lluajit-5.1
!exists(/usr/lib/liblua5.1.a):LIBLUA = -L/usr/local/lib -lluajit-5.1
+ symlinking my 5.1 folder of Lua modules to where LuaJIT was looking for them.

In terms of performance, they have a nice page here that shows how well it goes on algorithms: http://luajit.org/performance.html

On 'normal' usage of walking around and etc with a full curing system, I actually didn't notice much of an improvement looking at the s: meter - maybe 20% or so, hard to eyeball it since it jumps around here and there for such miniscule amounts (didn't help that I have CPU powersaving on so it'd clock the CPU from 2.2ghz to 800mhz as it wished).

Though, it'd be good to include in Mudlet starting with 1.3.0 or so since every bit does count.

Post Reply