[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT2 - Performance Expectancies
- From: Mike Pall <mikelu-0911@...>
- Date: Tue, 10 Nov 2009 09:58:47 +0100
Matthew P. Del Buono wrote:
> lj_BC_TGETS = 13.81 (LuaJIT)
That's a field or method access in the interpreter, i.e. obj.field
or obj:method. Interesting that this makes it to the top.
> lj_str_new = 7.17 (LuaJIT)
Umm, you're creating or hashing a lot of strings there? If it's
from Lua, then check for string.sub or the concat operator (..).
If it's from C, then check for lua_pushstring, lua_getfield,
lua_setfield. Too many of the latter two means you should consider
redesigning your C code (don't access Lua objects by name, use
> >> Because it's not a standalone application, it seems I can't use
> >> the "-jv" option.
> > I bet you can. Just redirect it to a file:
> > require("jit.v").start("dump.txt")
> Very nice, thanks :)
This should tell you why it doesn't compile much of your code.
Probably because it has too many Lua <-> C transitions (a common
trace abort reason would be: "NYI: C function ...").