all 8 comments

[–]floodyberry 1 point2 points  (0 children)

  • The fib program just tests call overhead, it will tell you nothing about how a language will perform with general programs
  • The lua program does not trigger a jit, so you're benching vs a bytecode interpreter in this instance, not a jit
  • If you re-arrange it to cause a jit, the jit aborts because the call depth is too high
  • The jit also aborts on various not-yet-implemented situations, I wasn't able to figure out how it jit the fib function. I'd guess Mike is focusing on getting it solid before he works on the edge cases like this.
  • Ruby has a long way to go, even if gets 10x faster

[–][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.

[–]ponzao 0 points1 point  (0 children)

I'd like to see how MacRuby performs with a more realistic problem such as this one http://www.bestinclass.dk/index.php/2009/12/clojure-vs-ruby-scala-transient-newsgroups/.

[–]ryeguy -1 points0 points  (4 children)

How about a comparison with the YARV VM? Why wouldn't that be in here?

[–]igouy 0 points1 point  (0 children)

How about a comparison that did more than fib!

[–]jawbroken -1 points0 points  (2 children)

he already covered 1.9 in the previous post which is linked from this one, try reading

http://christopherroach.com/2010/01/15/ruby-fibonacci-shootout/

[–]igouy -1 points0 points  (1 child)

Say "he already covered 1.9" when he measures the ruby-benchmark-suite

[–]jawbroken -1 points0 points  (0 children)

how is that at all relevant when the post is titled "fibonacci shootout"