less aggressive constant.

series of sizes should now be:

```
 # let next n = n + n lsr 1 + 2;;
 # CCSeq.unfold (fun x -> Some (x, next x)) 0 |> CCSeq.take 20 |> CCSeq.to_list;;
- : int list =
[0; 2; 5; 9; 15; 24; 38; 59; 90; 137; 207; 312; 470; 707; 1062; 1595; 2394;
 3593; 5391; 8088]
 ```
This commit is contained in:
Simon Cruanes 2022-02-03 19:15:13 -05:00
parent 02c0953468
commit 21c10d2ad4
No known key found for this signature in database
GPG key ID: 4AC01D0849AA62B6

View file

@ -84,7 +84,7 @@ let[@inline] array_is_empty_ v =
(* next capacity, if current one is [n] *)
let[@inline] next_grow_ n =
min Sys.max_array_length (n + n lsr 1 + 5)
min Sys.max_array_length (n + n lsr 1 + 2)
(* resize the underlying array using x to temporarily fill the array *)
let resize_ v newcapacity x =