This post originated from an RSS feed registered with Ruby Buzz
by Alexander Dymo.
Original Post: Is Ruby 2.3 Faster? Date Parsing Performance
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.
Ruby 2.3 was released last month with yet another bunch of performance improvements. But is it really faster than 2.2? Let's take a look.
This is the second post in my series about Ruby 2.3 performance. This time we'll look at date parsing performance.
Date parsing became faster in Ruby 2.3. This is something I came across just today. It was neither announced as an improvement in the changelog, nor there's any indication that Date was optimized.
But the result is apparent. Consider this example:
On the surface, it is nothing to write home about. 10% speedup that is only visible when parsing dates from the large datasets.
But if you look at the Ruby 2.2 to 2.3 diff, you will not find any optimizations in the Date parsing. It's also not the side-effect of faster garbage collection because I turned that off. So why is it faster then?
Date parsing is 10% faster. But it seems that's not the big news. Subtle optimizations in Ruby VM do yield tangible performance improvements. This is something that we see for the first time since Ruby 1.9.3.
Did you like this post? Follow me on
Twitter
or
Google+
to stay updated on Ruby performance optimization news.