lua-users home
lua-l archive

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


Hello all,

I've been watching LuaJIT for a while now and decided to try integrating
it with a 3D application I'm working on. Because a significant amount of
work is done with Lua (and Lua code is called on every frame), I thought
there might be a noticeable improvement by replacing Lua 5.1.4 with
LuaJIT 2.

Unfortunately, this required a fully automated build across several
platforms using CMake, so I had to essentially rewrite LuaJIT's makefile
in CMake format and consider the (notably minor, but important)
differences between platforms. Because I've never used LuaJIT before,
I'm pretty willing to admit I'll have likely screwed something up there.

That being said, it compiles properly and runs like a charm.
Unfortunately, I don't see much difference, if any. In fact, I can
execute jit.off() in our configuration file and I don't see a change in
FPS at all. In fact, the only way I could tell that it is in fact using
LuaJIT was the one time that I replaced the LuaJIT DLL with the official
Lua DLL, I started getting errors due to "jit" being a nil value.
Interestingly enough, after fixing this problem, it seemed even the
official Lua distribution was on par with LuaJIT.

What I'm trying to get at is that I think that we /should/ be getting a
decent performance improvement, but aren't. Does anyone have a
suggestion on how I might be able to investigate what LuaJIT is doing in
hopes of tuning its performance (or, more likely, fixing something I'm
just plain doing wrong)? Because it's not a standalone application, it
seems I can't use the "-jv" option.

Any pointers would be most appreciated,

Regards,
======

Matthew P. Del Buono