mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
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:
parent
02c0953468
commit
21c10d2ad4
1 changed files with 1 additions and 1 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue