Skip to content

Commit 18c4d16

Browse files
authored
Fix performance bug in Obj.reachable_words (#10731)
Fixes: #10730
1 parent 1067f77 commit 18c4d16

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Working version
2929
(Xavier Leroy and David Allsopp, review by Sébastien Hinderer and
3030
Damien Doligez)
3131

32+
- #10730, 10731: Fix bug in `Obj.reachable_words` causing a slowdown when called
33+
multiple time (Alain Frisch, report by ygrek, review by Xavier Leroy)
34+
3235
### Code generation and optimizations:
3336

3437
- #10578: Increase the number of integer registers used for

runtime/extern.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,7 @@ CAMLprim value caml_obj_reachable_words(value v)
11351135
uintnat h = 0;
11361136
uintnat pos;
11371137

1138+
obj_counter = 0;
11381139
extern_init_position_table();
11391140
sp = extern_stack;
11401141
size = 0;

0 commit comments

Comments
 (0)