mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
add benchmark
This commit is contained in:
parent
765a8da876
commit
fd1495324a
1 changed files with 3 additions and 1 deletions
|
|
@ -1153,12 +1153,14 @@ module Iter_ = struct
|
||||||
let bench_to_array n =
|
let bench_to_array n =
|
||||||
let iter () = Iter.to_array Iter.(1 -- n)
|
let iter () = Iter.to_array Iter.(1 -- n)
|
||||||
and gen () = Gen.to_array Gen.(1 -- n)
|
and gen () = Gen.to_array Gen.(1 -- n)
|
||||||
and oseq () = OSeq.to_array OSeq.(1 -- n) in
|
and oseq () = OSeq.to_array OSeq.(1 -- n)
|
||||||
|
and of_iter () = CCArray.of_iter Iter.(1 -- n) in
|
||||||
B.throughputN 3 ~repeat
|
B.throughputN 3 ~repeat
|
||||||
[
|
[
|
||||||
"iter.to_array", iter, ();
|
"iter.to_array", iter, ();
|
||||||
"gen.to_array", gen, ();
|
"gen.to_array", gen, ();
|
||||||
"oseq.to_array", oseq, ();
|
"oseq.to_array", oseq, ();
|
||||||
|
"ccarray.of_iter", of_iter, ();
|
||||||
]
|
]
|
||||||
|
|
||||||
let bench_cons n =
|
let bench_cons n =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue