Skip to content

Commit fde3e58

Browse files
Merge pull request #486 from ruby/mvh-remove-gc-compact
Remove GC.compact from the benchmark harness
2 parents c398455 + 508b0ed commit fde3e58

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

harness/harness-common.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,8 @@ def return_results(warmup_iterations, bench_iterations)
146146
yjit_stats = RubyVM::YJIT.runtime_stats if defined?(RubyVM::YJIT.enabled?) && RubyVM::YJIT.enabled?
147147
zjit_stats = RubyVM::ZJIT.stats if defined?(RubyVM::ZJIT.enabled?) && RubyVM::ZJIT.enabled?
148148

149-
# Full GC then compact before measuring RSS so fragmentation doesn't inflate the number.
149+
# Full GC before measuring RSS to lower GC variance.
150150
GC.start(full_mark: true, immediate_sweep: true)
151-
GC.compact if GC.respond_to?(:compact)
152151

153152
rss = get_rss
154153
ruby_bench_results["rss"] = rss

0 commit comments

Comments
 (0)