8 ms·
Rails was only about 5-6% faster in the last few nights of development builds (based on what is installed with rvm reinstall ruby-head). I would be surprised if
by brianhempel 13y ago
Rails was only about 5-6% faster in the last few nights of development builds (based on what is installed with rvm reinstall ruby-head). I would be surprised if the released 2.1.0 is more than one percentage point different from that.
Pretty graphs here: http://www.isrubyfastyet.com/ http://www.isrubyfastyet.com/ (I run a nightly benchmark.)
I will add 2.1.0 right now and hopefully we will have confirmed data in the morning.
EDIT: You mention 20% improvement on Rake tasks. Simple Rake tasks are dominated by Rails' startup time. My benchmark reads about a 15% improvement in startup time, which agrees with what you are saying.
However, the 1.9 series was a significant step back from 1.8.7 for out-of-the-box Rails startup time. Ruby 2.0.0 pretty much matched Ruby 1.8.7. Now with 2.1.0, Ruby is finally categorically faster than 1.8.7 for starting Rails. (Rails itself has also made improvements; but my benchmark has been locked at Rails 3.1.3)
- trustfundbaby 13y agoThanks for adding that information, I didn't know about slower Rails startup times with Ruby 1.9 v 1.8. And, you were right, I put Ruby 2.1.0 live on one of my web apps last night, and didn't really get any kind of significant speed boost, what I did get was a significant decrease in garbage collection. here's the new relic graph, ruby 2.1.0 went live at 17:45 on the chart https://cloudup.com/ifosPh4rX4v https://cloudup.com/ifosPh4rX4v
- VeejayRampay 13y agoI find it strange that JRuby would be the worst of all for all 4 categories though. Startup time I can understand, but given the right conditions, it's known to be pretty damn fast.
- lobster_johnson 13y agoThe JVM most likely hasn't been tuned. If I recall correctly it's also a very old JVM that is being used.
- polysics 13y agoI understand the importance of Rails in the Ruby ecosystem, but at the same time, I would really like it not being the only measure of Ruby's performance.
- brianhempel 13y agoI agree. However, when I sat down two years ago to make a benchmark, I couldn't think of anything better to benchmark than Rails. Micro-benchmarks don't predict large application performance very well. I don't like micro-benchmarks. A micro-benchmark suite is better than a few micro-benchmarks, but really I would like a suite of real-world micro-applications. I'm willing to add more benchmarks so it's not just Rails, but I simply don't know what to add.
- Argorak 13y agoWhich JVM are you running JRuby on? AFAIK, the one included in OS X 10.6 is not really the best performing one. Running with a more modern VM might yield better results.