Skip to content

Commit

Permalink
perf(vm): Avoid tracing global values unless we are in the root gc (-7%)
Browse files Browse the repository at this point in the history
The global state only contains values from the root gc
  • Loading branch information
Marwes committed Aug 31, 2019
1 parent 793b658 commit 48a5313
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vm/src/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,9 @@ impl Thread {
}

fn trace_fields_except_stack(&self, gc: &mut Gc) {
self.global_state.trace(gc);
if gc.generation().is_root() {
self.global_state.trace(gc);
}
self.rooted_values.read().unwrap().trace(gc);
self.child_threads.read().unwrap().trace(gc);
}
Expand Down

0 comments on commit 48a5313

Please sign in to comment.