mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-05 19:00:31 -05:00
Compare commits
2 commits
18ffdd707b
...
fd1495324a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd1495324a | ||
|
|
765a8da876 |
3 changed files with 5 additions and 3 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 =
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ val to_iter : 'a t -> 'a iter
|
||||||
val of_iter : 'a iter -> 'a t
|
val of_iter : 'a iter -> 'a t
|
||||||
(** [of_iter iter] builds a array from a given [iter].
|
(** [of_iter iter] builds a array from a given [iter].
|
||||||
In the result, elements appear in the same order as they did in the source [iter].
|
In the result, elements appear in the same order as they did in the source [iter].
|
||||||
@since 3.15 *)
|
@since NEXT_RELEASE *)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a Seq.t
|
val to_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ val to_iter : 'a t -> 'a iter
|
||||||
val of_iter : 'a iter -> 'a t
|
val of_iter : 'a iter -> 'a t
|
||||||
(** [of_iter iter] builds a array from a given [iter].
|
(** [of_iter iter] builds a array from a given [iter].
|
||||||
In the result, elements appear in the same order as they did in the source [iter].
|
In the result, elements appear in the same order as they did in the source [iter].
|
||||||
@since 3.15 *)
|
@since NEXT_RELEASE *)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a Seq.t
|
val to_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue