Project

General

Profile

Actions

Bug #18929

closed

ruby master looks slower than 3.1 on a micro benchmark of short-lived objects

Added by mame (Yusuke Endoh) almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Target version:
-
[ruby-core:109256]

Description

$ time ruby -ve '10000000.times { Object.new }'
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]

real    0m2.503s
user    0m2.484s
sys     0m0.016s

$ time ./local/bin/ruby -ve '10000000.times { Object.new }'
ruby 3.2.0dev (2022-07-20T00:40:59Z master e330dceb3f) [x86_64-linux]

real    0m3.074s
user    0m3.016s
sys     0m0.052s

I plotted a graph for daily commits in this year:

We can see a clear slowdown before and after 2022-05-09. As far as I checked each commit on the day, https://github.com/ruby/ruby/commit/85479b34f76d5b426c2a8224d8ed6d8c2ad81ca2 seems a trigger, but reverting this commit did not change the performance.

It's just a microbenchmark, but I think there may be room for improvement. @peterzhu2118 (Peter Zhu) Could you check it out?


Files

clipboard-202207201713-zs81l.png (18.2 KB) clipboard-202207201713-zs81l.png mame (Yusuke Endoh), 07/20/2022 08:13 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0