News for hackers. Stuff that matters.
Re:Ruby 3.0 by Rochus on Friday December 25, 2020 @04:37AM (#25535398)
I did some measurements recently with 3.0.0 RC1 compared to 2.1.0 based on https://github.com/smarr/are-we-fast-yet. Here are the results: http://software.rochus-keller.ch/are-we-fast-yet_crystal_rub.... Ruby 3.0 without JIT is factor 1.2 faster than Ruby 2.1.0; Ruby 3.0 with JIT is only factor 1.4 faster than Ruby 2.1.0. Crystal is about factor 20 faster.
Re:Ruby 3.0 by eregon on Friday December 25, 2020 @08:08AM (#25536247)
Interesting results, thanks for sharing, that matches my expectations. OptCarrot is probably one of the rare cases where Ruby 3.0+JIT is 3x Ruby 2.0. On most benchmarks, the gains are much smaller.

I'll try to run these benchmarks on TruffleRuby (and maybe JRuby) too, would be an interesting comparison.

BTW, is there any reason you used 2.1.0 and not 2.0.0? Maybe some issue with 2.0.0?

Re:Ruby 3.0 by Rochus on Friday December 25, 2020 @09:13AM (#25536577)
> OptCarrot is probably one of the rare cases where Ruby 3.0+JIT is 3x Ruby 2.0

The Are-we-fast-yet suite is optimized for inter-language comparisons and sets the focus on ideomatic language use and representative algorithms. There is a peer-reviewed scientific publication; here is a preprint: https://stefan-marr.de/papers/dls-marr-et-al-cross-language-...

> is there any reason you used 2.1.0 and not 2.0.0?

The 2.0 version produced errors like "uninitialized constant Process::CLOCK_MONOTONIC (NameError)"; from that I concluded that it is not compatible. I still had to apply a fix (https://bugs.ruby-lang.org/issues/9578) to make Ruby 2.1.0 compile on my test machine. Here is a report version where I compare with Ruby 2.7 instead of 2.1: http://software.rochus-keller.ch/are-we-fast-yet_crystal_rub...

Re:Ruby 3.0 by jashmatthews on Friday December 25, 2020 @02:28PM (#25538451)
> The Are-we-fast-yet suite is optimized for inter-language comparisons and sets the focus on ideomatic language use and representative algorithms. There is a peer-reviewed scientific publication; here is a preprint: https://stefan-marr.de/papers/dls-marr-et-al-cross-language-...

Benoit (eregon) is the second author of that paper.

Re:Ruby 3.0 by Rochus on Friday December 25, 2020 @03:58PM (#25538983)
Well, apparently he does not want to be recognized; without your hint I would not have figured it out (there is also no indication in the profile). At least I don't have to convince him of the benchmark's quality.

EDIT: surprised to learn that his group is responsible for the GraalVM and even located in Zurich (https://labs.oracle.com/pls/apex/f?p=LABS:project_details:0:...) which is not far from the place I live; it's a small world ;-)