Project

General

Profile

Actions

Bug #22210

open

Check if issue #19969 is still reproducible / re-opened in 4.0.x

Bug #22210: Check if issue #19969 is still reproducible / re-opened in 4.0.x

Added by saka_omo (Yuki Takei) 2 days ago. Updated 1 day ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:126156]

Description

Hi team,

I am writing to ask if Bug #19969 might still be reproducible in the current version of Ruby.
Could you please check if the issue is still present or if a regression has occurred?

I ran the reproduction script from #19969 across several Ruby versions on macOS (arm64-darwin), and while Ruby 3.2.4 fixed the high memory consumption (dropping to 29 MiB), Ruby 4.0.5 spikes back up to 2215 MiB.

ruby -v -rset -e 's1 = Set.new(10000.times); s2 = Set.new(9999.times); Array.new(10000) { s1 - s2 - [0] }; puts "#{`ps -o rss= -p #{$$}`.to_i / 1024} MiB"'

Results across versions:

ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [arm64-darwin22]
183 MiB

ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
2364 MiB

ruby 3.2.4 (2024-04-23 revision af471c0e01) [arm64-darwin22]
29 MiB

ruby 4.0.5 (2026-05-20 revision 64336ffd0e) +PRISM [arm64-darwin24]
2215 MiB
Actions

Also available in: PDF Atom