4 ms·
Rubinius can run pure ruby code much faster than YARV because of things like a better GC and the ability to compile ruby code down to machine code (a JIT compil
by evanphx 16y ago
Rubinius can run pure ruby code much faster than YARV because of things like a better GC and the ability to compile ruby code down to machine code (a JIT compiler).
Rubinius is much easier to work and understand than YARV because much of the core functionality is written in Ruby itself. This lends itself to being easier to hack on and add features to.
- kkowalczyk 16y agoBut is it actually faster? Rubinius homepage claims that it's fast but has no benchmark results that I could find, which makes it hard to take those claims seriously. I like the way JavaScript engines are being compared using two or three standard benchmarks. (to pre-empt "benchmarks are useless" comments: yes, benchmarks are flawed because they only measure what they measure, but a decent benchmark is better than no benchmark).
- wgj 16y agoYou might find this interesting: http://programmingzen.com/2010/07/19/the-great-ruby-shootout-july-2010/ http://programmingzen.com/2010/07/19/the-great-ruby-shootout... It shows 1.9.2 to be a bit faster most of the time, and to have a smaller footprint. Still, Rubinius could be the better choice in some cases. The best thing is to run your own perf tests specific to your application, and rvm makes that head to head comparison easier to carry out.
- technomancy 16y ago> But is it actually faster? It's much faster at executing pure-ruby code. Since it has a much smaller portion implemented in C, total execution time may or may not be slower than YARV; it depends on the execution profile of the task at hand. Code that spends most of its time in things that YARV does in C will be slower on Rubinius.