File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ let run_one_domain ~budgetf ?(n_ops = 400 * Util.iter_factor) ?(n_keys = 1000)
23
23
for _ = 1 to n_keys do
24
24
let value = Random. bits () in
25
25
let key = value mod n_keys in
26
- Htbl. add t key value
26
+ Htbl. replace t key value
27
27
done ;
28
28
29
29
let n_ops = (100 + percent_mem) * n_ops / 100 in
@@ -50,7 +50,7 @@ let run_one_domain ~budgetf ?(n_ops = 400 * Util.iter_factor) ?(n_keys = 1000)
50
50
loop (n - 1 )
51
51
end
52
52
else if op < limit_add then begin
53
- Htbl. add t key value;
53
+ Htbl. replace t key value;
54
54
loop (n - 1 )
55
55
end
56
56
else begin
@@ -85,7 +85,7 @@ let run_one ~budgetf ~n_domains ?(n_ops = 400 * Util.iter_factor)
85
85
for _ = 1 to n_keys do
86
86
let value = Random. bits () in
87
87
let key = value mod n_keys in
88
- Htbl. add t key value
88
+ Htbl. replace t key value
89
89
done ;
90
90
91
91
let n_ops = (100 + percent_mem) * n_ops / 100 in
@@ -115,7 +115,7 @@ let run_one ~budgetf ~n_domains ?(n_ops = 400 * Util.iter_factor)
115
115
end
116
116
else if op < limit_add then begin
117
117
Mutex. lock mutex;
118
- Htbl. add t key value;
118
+ Htbl. replace t key value;
119
119
Mutex. unlock mutex;
120
120
loop (n - 1 )
121
121
end
You can’t perform that action at this time.
0 commit comments