lua-users home
lua-l archive

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

Thanks for you hints, Mike !
I finally found that the core reason is that we are using our internal IDE to launch scripts during the development phase, and the IDE is using the lua_debug interface, by settings some hooks.
When the script is called without this, it works perfectly !

Thanks, Sylvain.

Le 25/01/2011 16:16, Mike Pall a écrit :
Sylvain Fabre wrote:
After a few tests with some scripts, i have strictly no performance
gain between both versions. Even worse : in some cases, luaJIT is
slower than lua51.
How much of the CPU time of your application is spent in Lua code?
How much of the CPU time is spent in C/Lua and Lua/C transitions?
If you cannot readily answer these questions then I suggest to
profile your application first.

I am sure to use the right LUA DLL, as the "jit" object exists when
i link with luaJIT.
Umm, which version do you use?

I guess that i forgot something at the installation or run level. Any idea ?
Have you followed the instructions in

Or do you have a typical bench script, in order for me to be sure
that i can reproduce the same environnement than in the benchmark
page of luaJIT ?
Here's a trivial test:

   local x=0; for i=1,1e9 do x=math.abs(x) end

This should run in a fraction of a second with LuaJIT 2.0, but
will take more than a minute with Lua. It's around 214x faster.


Sylvain FABRE
Fixe: 09 72 11 30 24
Mobile: 06 30 12 72 34
Fax : 09 72 11 10 71