Hacker News new | past | comments | ask | show | jobs | submit login

Basic Ruby 2.0 benchmarks calculating pi from gist [1]

$ ruby --version

ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-darwin12.2.1]

$ time ruby pidigits.rb 10000 2>&1 > /dev/null

17.51s user 0.11s system 99% cpu 17.639 total

$ ruby --version

ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1]

$ time ruby pidigits.rb 10000 2>&1 > /dev/null

4.64s user 0.27s system 99% cpu 4.927 total

That's a significant difference in speed. Going from 17.51 seconds to 4.64 seconds

1. https://gist.github.com/thoughtpolice/5025417

I've also seen a speedup in Rails app boot time (the require optimizations):

1.9.3-p194: 11.8s

1.9.3-p385: 9.9s

2.0.0-rc2: 6.1s!

Tests were done with `time bundle exec rake environment` 5 times, dropping the highest and lowest and getting the mean of the rest (lazy snow day benchmarking). Very exciting!

If we see these sorts of improvements overall, then this is a very exciting update

Agreed. Testing against some of my production apps now to get a better feel.

How did it go?

Not tried 2.0 yet but got very significant speedup of 1.93 (about 3x) when I enabled optimisation in the build. Were the build settings similar for both versions in your tests?

Thank you for trying. What script `pidigits.rb' do you use?

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact