2/22/2007

各 Ruby VM Performance 比較

Antonio Cangiano 發表了一篇大作 Ruby Implementations Shootout: Ruby vs Yarv vs JRuby vs Gardens Point Ruby .NET vs Rubinius vs Cardinal。裡面比較了 Ruby on Linux,Ruby on Windows,Yarv,jRuby,Ruby.NET,Rubinius,Cardinal 上面的 Ruby Performance 表現。結果出爐

YARV 大獲全勝!!!

這是最後結果,左邊是完成的時間,所以越短代表 performance 越快


除了 YARV 以外,每個其他的 VM 都輸給 Ruby on Linux 的效能,而且 YARV 在所有測試都沒有 Error,可靠性似乎不錯。

最令我期待的 JRuby 輸給了 YARV ,不過 JRuby 作者 Charles Oliver Nutter 出來說話了,他說他們還有秘密武器
This is JRuby in interpreted mode, compared to YARV, Ruby.NET, and Rubinius running with compiled code. Our prototype compiler has shown we can improve speed many times.
也就是其他的 VM 都有 Compiler mode,JRuby 的測試卻是用 interpreted mode 去比,當然效果不佳。而他們裡面內部研發的 JRuby Compiler 目前只有雛形,不過已經可以加快 many times 的速度。不過我認為 JRuby 還是先將可靠性跟 Bug 修完吧,裡面有四個 Test 有 Error。

總之,這是一個很好的測試, Ruby 的 VM 似乎已經刪減到在 YARV 或是 JRuby 之中做選擇了。

沒有留言: