summaryrefslogtreecommitdiff
path: root/yjit.rb
diff options
context:
space:
mode:
authorMau Magnaguagno <maumagnaguagno@gmail.com>2022-12-19 12:44:23 -0300
committerGitHub <noreply@github.com>2022-12-19 10:44:23 -0500
commitb2f53dccbedd9f399bc4668eb02f26b2eafa6f5c (patch)
tree2773dfd6ff6a035c9e8ba4d8e055cb2510663364 /yjit.rb
parent1482f0649e303c8bf11281268d3e1e6e2370c093 (diff)
downloadruby-b2f53dccbedd9f399bc4668eb02f26b2eafa6f5c.tar.gz
YJIT: skip map in print_sorted_exit_counts (#6954)
Array#sum accepts a block.
Diffstat (limited to 'yjit.rb')
-rw-r--r--yjit.rb2
1 files changed, 1 insertions, 1 deletions
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):"