5x performance degredation from rbx 2.5.8 to rbx 3.69 #3718

Closed
PragTob opened this Issue Dec 20, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@PragTob

PragTob commented Dec 20, 2016

  1. What command did you run?

I ran ruby full_playout.rb as well as mcts_avg.rb, one works with benchmark-ips the other with a self written benchmarking library. I ran both with 2.5.8 and 3.69 through RVM. Scripts available here: https://github.com/PragTob/rubykon /tree/master/benchmark

The script that switches these is available as well: https://github.com/PragTob/rubykon/blob/master/benchmark/benchmark.sh

  1. What behavior did you expect?

I expected rbx 3.69 to be about as fast as 2.5.8 or faster.

  1. What behavior did you get instead?

I observed that it got about 5 times slower. You can see results in this gist.

  1. What version of Rubinius?

As I said 3.69 (was most up to date when I installed last week) and 2.5.8

Output of rbx -v:

tobi@speedy ~/github/rubykon $ rbx -v
rubinius 3.69 (2.3.1 a57071c6 2016-11-17 3.8.0) [x86_64-linux-gnu]
  1. What version of operating system?

Output of uname -a: Linux speedy 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

  1. What is your operating system distribution, if your operating system has more than one?

My distribution is Linux Mint 18 (based on Ubuntu 16.04)

  1. How did you build your version of Rubinius?
  • I used RVM.
  • I used ruby-build.
  • I used ruby-install.
  • I built manually from a tarball.
  • I built manually from a git clone.
  • I installed a binary.
  1. Does this issue involve proprietary code?
  • Yes, this issue involves proprietary code that I cannot share.
  • Yes, this issue involves proprietary code, but I am able to share it under certain conditions.
  • No, this issued doesn't involve proprietary code.
  1. Are you able to help us debug the issue?
  • Yes, I'm able to help debug, including running commands under lldb.
  • No, I'm not able help debug or I don't have time to help.

Why did I run all this? I wanted to make a redo of my benchmarks of ruby implementations from last year seeing how the implementations improved in the last year :)

@brixen

This comment has been minimized.

Show comment
Hide comment
@brixen

brixen Dec 20, 2016

Member

@PragTob the just-in-time compiler (JIT) has been removed to make way for a new interpreter and JIT infrastructure. That is the reason you're seeing the performance degradation (and illustrates how important JIT is to making Ruby fast). The JIT was removed because it had a number of bugs and was too complicated, resulting in almost no contributors making improvements.

If you're interested in helping with the new interpreter and JIT, I can point you to some tasks to get started.

Member

brixen commented Dec 20, 2016

@PragTob the just-in-time compiler (JIT) has been removed to make way for a new interpreter and JIT infrastructure. That is the reason you're seeing the performance degradation (and illustrates how important JIT is to making Ruby fast). The JIT was removed because it had a number of bugs and was too complicated, resulting in almost no contributors making improvements.

If you're interested in helping with the new interpreter and JIT, I can point you to some tasks to get started.

@brixen brixen closed this Dec 20, 2016

@PragTob

This comment has been minimized.

Show comment
Hide comment
@PragTob

PragTob Dec 20, 2016

@brixen the news that the JIT got removed from rubinius must have passed me by, will dig the blog to find a full blog post. Not really a JIT implementing person so probably no help from my side, but good luck in your endeavors! :)

PragTob commented Dec 20, 2016

@brixen the news that the JIT got removed from rubinius must have passed me by, will dig the blog to find a full blog post. Not really a JIT implementing person so probably no help from my side, but good luck in your endeavors! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment