mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-01-21 16:56:39 -05:00
perf: small optim in Pool.sequence_a
This commit is contained in:
parent
dd1cf2a046
commit
8982f87ca7
1 changed files with 1 additions and 0 deletions
|
|
@ -517,6 +517,7 @@ module Make(P : PARAM) = struct
|
|||
(* map an array of futures to a future array *)
|
||||
let sequence_a a = match a with
|
||||
| [||] -> return [||]
|
||||
| [| x |] -> map (fun x->[|x|]) x
|
||||
| _ ->
|
||||
sequence_ (A_ a)
|
||||
(fun () -> Array.map get_nolock_ a)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue