mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-03-07 21:27:55 -05:00
test pvec: avoid size explosion
This commit is contained in:
parent
9ec34f8bf8
commit
ea5d9bbdf4
1 changed files with 5 additions and 1 deletions
|
|
@ -265,10 +265,14 @@ module Op = struct
|
||||||
( 1,
|
( 1,
|
||||||
list_small gen_x >|= fun l ->
|
list_small gen_x >|= fun l ->
|
||||||
Append l, size + List.length l );
|
Append l, size + List.length l );
|
||||||
|
];
|
||||||
|
(if size < 10_000 then [
|
||||||
|
(* flat map can explode, only do it if list isn't too big *)
|
||||||
( 1,
|
( 1,
|
||||||
list_size (0 -- 5) gen_x >|= fun l ->
|
list_size (0 -- 5) gen_x >|= fun l ->
|
||||||
Flat_map l, size * (1 + List.length l) );
|
Flat_map l, size * (1 + List.length l) );
|
||||||
];
|
] else [])
|
||||||
|
;
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue