The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Is Ruby 2.3 Faster? No Significant Improvement In Rails Applications

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Alexander Dymo

Posts: 24
Nickname: adymo
Registered: Feb, 2004

Alexander Dymo is the author of the Ruby Performance Optimization book
Is Ruby 2.3 Faster? No Significant Improvement In Rails Applications Posted: Feb 25, 2016 1:36 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Alexander Dymo.
Original Post: Is Ruby 2.3 Faster? No Significant Improvement In Rails Applications
Feed Title: Ruby and Rails Performance Optimization
Feed URL: http://ruby-performance-book.com/blog/feed/
Feed Description: This is the blog about Ruby and Rails performance optimization techniques, tips, and tricks. Learn how the newest Ruby releases perform in the field, see how to reduce memory and CPU usage, discover the world of profiling, measuring, and performance testing.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Alexander Dymo
Latest Posts From Ruby and Rails Performance Optimization

Advertisement

Ruby 2.3 was released in December 2015 with yet another bunch of performance improvements. But is it really faster than 2.2? Let's take a look.

This is the sixth and, most likely, last post in my series about Ruby 2.3 performance. We'll see whether upgrading the real world Rails apps from Ruby 2.2 to 2.3 improves performance. Spoiler alert: it does not.

I was concerned that Ruby is actually getting faster. Looks like there is no reason to worry. Rails/Ruby expert who switched to Phoenix/Elixir

I still remember how big of an improvement Ruby 2.1 was. Startup time was reduced tenfold. Performance tests reported a minimum of 15% speedup. New Relic request time and memory usage metrics went sharply down.

So I was eager to upgrade my production Rails apps to Ruby 2.3 and measure the performance.

Here's what I got. In the table below you'll see some of the performance benchmarks for Acunote, the online project management system:

Benchmark Ruby 2.2.3 Ruby 2.3.0
Benchmark Burndown 120 0.82 ± 0.00 0.86 ± 0.00
Benchmark Sprint 20 x (1+5) (C) 0.24 ± 0.00 0.24 ± 0.00
Benchmark Analyze 20 x (1+5) 1.78 ± 0.02 1.80 ± 0.03
Benchmark Task Details Page 0.39 ± 0.01 0.38 ± 0.00
Benchmark Signup 0.30 ± 0.00 0.29 ± 0.00
Benchmark Copy 120 1.48 ± 0.02 1.42 ± 0.02
Benchmark Import 71 2.08 ± 0.00 1.99 ± 0.03
Benchmark Set Field (EP) 0.18 ± 0.00 0.17 ± 0.01

The table is incomplete. I have about 60 benchmarks for Acunote, but only the two highlighted ones demonstrated an improvement in the statistically significant way.

The Copy 120 benchmark is heavy on rendering, and Import 71 is heavy on garbage collector. Both got 4% faster.

For another application I didn't have the performance tests, but I had New Relic:

Time spent in Ruby before and after upgrade

Do you see improvement? I don't. Neither for this one, nor for my other applications.

Verdict: Not Significantly Faster

It turns out Ruby 2.3 is not significantly faster than 2.2. Best improvement I got was a meager 4% speedup in rendering-heavy and memory-heavy benchmarks.

Note, I upgraded only 5 Rails applications. That is all I have at the moment. If you upgraded to Ruby 2.3 and got a significant increase in performance, please let me know. I'm eager to hear about it!

Read More On Ruby 2.3 Performance

I investigated the effect of various specific improvements in Ruby 2.3 on performance before writing this post. Take a look, you might find something relevant to you.

  1. Nested Iterator Performance
  2. Date Parsing Performance
  3. Rails ERB Template Rendering Performance
  4. Immutable (Frozen) String Literals Performance
  5. How to Prepare Yourself for Frozen String Literals and Not Lose Performance

Want to learn more about the Ruby performance optimization? Curious about performance profiling, benchmarking, and testing? Click the link below to get my Ruby Performance Optimization book.

Did you like this post? Follow me on Twitter or Google+ to stay updated on Ruby performance optimization news.

Read: Is Ruby 2.3 Faster? No Significant Improvement In Rails Applications

Topic: $6 Discount on Ruby Performance Optimization Book (Paperback) Today on Amazon Previous Topic   Next Topic Topic: Is Ruby 2.3 Faster? How to Prepare Yourself for Frozen String Literals and Not Lose Performance

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use