Thanks for filling out our form!
Here's what happens next:

We'll write you back as soon as possible, right now we might be very busy saving the World. Give us a day or two, we'll contact you for sure.


In the meantime, perhaps you would like to take a look at one of our blog posts that explains

How do we work with our Clients
How we can help you with your business

In Touch,
Prograils Team

Prograils blog

Piotr Boniecki on 30.01.14 in Ruby on Rails
Post ruby performance

Ruby 2.1.0 performance in Rails tests

Ruby 2.1.0 introduced many performance improvements.

Ruby 2.1.0 (released on the very end of previous year) introduced many performance improvements, about which you can read here https://www.ruby-lang.org/en/news/2013/12/25/ruby-2-1-0-is-released/. In fact, Ruby core developer Aman Gupta published earlier today nice post about how GC works now.

How much faster can Ruby 2.1 be in day-to-day workflow? I've decided to give it a try and checked on one of our apps with ~600 tests and 1600 assertions.


Intel(R) Core(tm) i5-2500 CPU @ 3.30GHz x 4 / 8GB RAM / SSD (Ubuntu 12.04)

ruby-2.0.0-p353:

ruby-2.1.0:

Improvement => 2:48,047 - 2:20,735 = 27,31 s => 16.25%


MacBook Air - Intel Core i5 1,6GHz, 4GB RAM (OSX 10.9)

ruby-2.0.0-p353:

ruby-2.1.0:

Improvement => 4:35,18 - 3:17,02 = 78,16 s => 28.40%


Those tests could be done better, be more in-depth, they could show how new Ruby is performing for specific operations. But what's most important for us, as developers, is how quicker our tests can be. And hopefully this posts answers that (in some wide perspective). As you can see your test can be faster up to almost 30%. So if you're still on 2.0 then definitelly give new GC a try.

(credits: photo from unsplash.com)

Share on
comments powered by Disqus