News for hackers. Stuff that matters.
Re:Ruby 3.0 by fouc on Friday December 25, 2020 @05:14AM (#25535548)
the Ruby 2.7 benchmarks [0] seem to shows that Ruby is slightly faster than Python 3, or at least fairly competitive.

Though things like Python 3 going from 18.45 seconds to 2.67 seconds on the regex-redux test [1][2] tends to make me question the validity/usefulness of these benchmarks. (inasmuch - how much of it is testing language performance vs bypassing it?)

[0] https://web.archive.org/web/20200301005643/https://benchmark... [1] https://web.archive.org/web/20191225153009/https://benchmark... [2] https://web.archive.org/web/20200604134902/https://benchmark...

Re:Ruby 3.0 by eregon on Friday December 25, 2020 @08:16AM (#25536285)
I've also found that the Computer Language Benchmarks Game benchmarks tend to be less and less representative of real workloads, due to what the benchmarks do and to the philosophy of "write it to make it fast, not idiomatic, and parallelize things that would typically not be parallelized". Just taking a look at the benchmark code makes it clear it's very far from idiomatic Ruby code.
Re:Ruby 3.0 by igouy on Saturday December 26, 2020 @12:46PM (#25544986)
> …the philosophy of…

Actual quotation —

'You will probably come across people saying that the programs are not idiomatic ("enough"). So read the description and write your own idiomatic program, without programming tricks.'

https://salsa.debian.org/benchmarksgame-team/benchmarksgame/...

Re:Ruby 3.0 by igouy on Friday December 25, 2020 @05:58PM (#25539754)
I think it's unfortunate that you've chosen to make such vague disparaging comments.

Here are 37 Ruby programs — https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Presumbly you can show us 2 lists: which of them are your idea of "idiomatic" and which are not ?

Merry Christmas.

Re:Ruby 3.0 by p_l on Friday December 25, 2020 @06:34AM (#25535876)
Ruby version of regex-redux uses built-in regex support, and I'm not even sure if it uses it the most performant way.

Significant portion of the Python test case is FFI code to directly link PCRE bypassing even normal Python extension support.

I guess I should augment some of the SBCL benchmarks with custom assembly then...

Re:Ruby 3.0 by igouy on Friday December 25, 2020 @03:29PM (#25538806)
> …SBCL benchmarks with custom assembly then…

How could that possibly effect the performance of the Ruby regex-redux? :-)

"Wanted — Ruby PCRE2 regex-redux program"

https://salsa.debian.org/benchmarksgame-team/benchmarksgame/...

Re:Ruby 3.0 by p_l on Saturday December 26, 2020 @03:20PM (#25546171)
It wouldn't help ruby, but I'd rather write common lisp ;)
Re:Ruby 3.0 by igouy on Sunday December 27, 2020 @02:15PM (#25553448)
Fair enough :-)

(Although they wouldn't be accepted — the option of using those widely libraries is only for pi-digits and regex-redux; and not "custom assembly".)

Re:Ruby 3.0 by igouy on Friday December 25, 2020 @03:26PM (#25538784)
> Python 3 going from 18.45 seconds to 2.67 seconds on the regex-redux

You do realize those are different programs, don't you?

You do realize that both those Python programs are shown in the current measurements, don't you?

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

But if you really want to show us the old Q6600 measurements so many people have complained about, the latest version is here:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...