Is Ruby 2.3 Faster? Date Parsing Performance
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:
|Date#parse performance||0.928 ± 0.011 s||0.843 ± 0.010 s|
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.
|Next:||Is Ruby 2.3 Faster? Rails ERB Template Rendering Performance|
|Previous:||Is Ruby 2.3 Faster? Nested Iterator Performance|