From b2f53dccbedd9f399bc4668eb02f26b2eafa6f5c Mon Sep 17 00:00:00 2001 From: Mau Magnaguagno Date: Mon, 19 Dec 2022 12:44:23 -0300 Subject: YJIT: skip map in print_sorted_exit_counts (#6954) Array#sum accepts a block. --- yjit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yjit.rb') diff --git a/yjit.rb b/yjit.rb index 0103c7c124..8328a79429 100644 --- a/yjit.rb +++ b/yjit.rb @@ -303,7 +303,7 @@ module RubyVM::YJIT total_exits = total_exit_count(stats) if total_exits > 0 - top_n_total = exits.map { |name, count| count }.sum + top_n_total = exits.sum { |name, count| count } top_n_exit_pct = 100.0 * top_n_total / total_exits $stderr.puts "Top-#{exits.size} most frequent exit ops (#{"%.1f" % top_n_exit_pct}% of exits):" -- cgit v1.2.1