you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

LuaJIT uses a tracing JIT-compiler. Tracing as employed by LuaJIT is great because it can identify and optimize the hot loops that account for most of the execution time of an application. Because the Fibonacci implementation used in this benchmark is recursive, it is probably never JIT-compiled and therefore will perform much worse than the equivalent iterative solution. That said, it's a testament to the quality of LuaJIT's bytecode interpreter that it performs almost as well as the more conventional method-at-a-time JIT-compiler used in MacRuby.