Skip to content

Commit 7dd36fb

Browse files
rwstaunerXrXr
andauthored
Simplify exit counter reset operation
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
1 parent ee04a33 commit 7dd36fb

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

zjit/src/stats.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,7 @@ pub extern "C" fn rb_zjit_reset_stats_bang(_ec: EcPtr, _self: VALUE) -> VALUE {
247247
*counters = Counters::default();
248248

249249
// Reset exit counters for YARV instructions
250-
for i in 0..(VM_INSTRUCTION_SIZE as usize) {
251-
exit_counters[i] = 0;
252-
}
250+
exit_counters.as_mut_slice().fill(0);
253251

254252
Qnil
255253
}

0 commit comments

Comments
 (0)