YJIT: skip map in print_sorted_exit_counts (#6954)
Array#sum accepts a block.
This commit is contained in:
parent
1482f0649e
commit
b2f53dccbe
Notes:
git
2022-12-19 15:44:42 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
2
yjit.rb
2
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):"
|
||||
|
Loading…
x
Reference in New Issue
Block a user