Skip to content

Commit

Permalink
Fix performance bug in Obj.reachable_words (#10731)
Browse files Browse the repository at this point in the history
Fixes: #10730
  • Loading branch information
alainfrisch committed Oct 27, 2021
1 parent 1067f77 commit 18c4d16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Working version
(Xavier Leroy and David Allsopp, review by Sébastien Hinderer and
Damien Doligez)

- #10730, 10731: Fix bug in `Obj.reachable_words` causing a slowdown when called
multiple time (Alain Frisch, report by ygrek, review by Xavier Leroy)

### Code generation and optimizations:

- #10578: Increase the number of integer registers used for
Expand Down
1 change: 1 addition & 0 deletions runtime/extern.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,7 @@ CAMLprim value caml_obj_reachable_words(value v)
uintnat h = 0;
uintnat pos;

obj_counter = 0;
extern_init_position_table();
sp = extern_stack;
size = 0;
Expand Down

0 comments on commit 18c4d16

Please sign in to comment.