lua-users home
lua-l archive

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


Paul Chiusano wrote:
I've been playing around with LuaJIT and the performance is quite
good. For most of my applications, I am seeing the running time cut by
30% to 50%! I did notice a few cases where code runs slower with jit
compilation, and in each case it was code which creates a lot of
functions dynamically (to use as iterators).

You can use the LuaJIT API to provide a hint to LuaJIT that
it should not compile a function.

Leaving a function non-compiled until its Nth call sounds
like a fun heuristic; I think that's one of the distinctions
between a traditional JIT engine and a hotspot-style JIT,
the latter trying to be aware of the cost/gains of performing a
particular level of JITting+optimisation on a particular
code area according to how 'hot' that code is.  Really can't
say whether it's worth the bother though, for LuaJIT's
lightweight remit.

--Adam
--
Adam D. Moss   -   adam@gimp.org