package ke
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=504386757350feb9eb5f5000f9d5dd3ca1b41a91e1b91ec6c63972b09bb88229
sha512=fce23bbda005119020c4c6d38f2d95bc677e012026a1c65cc5fbaec6ded62b87ae6db756fa7822933e33e0cbb3b583a9cdc16771f1f590a3dec79933de7e5359
Description
Queue implementation in OCaml (functional and imperative queue)
Published: 18 Mar 2022
README
Ke - Fast implementation of Queue in OCaml
Queue or FIFO is one of the most famous data-structure used in several algorithms. Ke
provides some implementations of it in a functionnal or imperative way.
It is a little library with benchmark (bechamel
or core_bench
), fuzzer and tests.
From what we know, Ke.Rke
is the faster implementation than Queue
from the standard library or the base
package. It is limited by some kind of data (see Bigarray.kind
) but enough for a large amount of algorithms. The fast operation is to put some elements faster than a sequence of Queue.push
, and get some elements faster than a sequence of Queue.pop
.
Then we provide a functionnal interface Fke
or an imperative interface Rke
.
We extended implementations to have a limit of elements to store (see Rke.Weighted
and Fke.Weigted
). The purpose of it is to limit memory consumption of queue when we use it in some contexts (like encoder).
Again, as a part of the MirageOS project, Ke
does not rely on C stubs, Obj.magic
and so on.
Author: Romain Calascibetta romain.calascibetta@gmail.com
Documentation: https://mirage.github.io/ke/
Notes about Implementations
The functionnal implementation Fke
is come from the Okazaki's queue implementation with GADT to discard impossible case.
Rke
, Rke.Weighted
and Fke.Weighted
was limited by kind and follow Xen's implementation of the shared memory ring-buffer. Length of the internal buffer is, in any case, a power of two - that means, in some context, for a large amount of elements, this kind of queue does not fit on your request.
Fuzzer was made to compare the standard Queue (as an oracle) with Rke
and Fke
. We construct a set of actions (push
and pop
) and ensure (by GADT) to never pop
an empty queue.
Dependencies (4)
- bigarray-compat
-
fmt
>= "0.8.7"
-
dune
>= "2.0"
-
ocaml
>= "4.03.0"
Dev Dependencies (13)
-
cmdliner
>= "1.1.0" & with-test
-
psq
with-test
-
jsonm
with-test
-
rresult
with-test
-
crowbar
with-test
-
lwt
with-test
-
core_bench
with-test
-
ocplib-json-typed
with-test
-
bechamel-perf
with-test
-
bechamel-notty
with-test
-
bechamel
with-test
-
bigstringaf
with-test
-
alcotest
with-test
Used by (27)
-
carton
< "0.4.4"
-
carton-git
< "0.4.4"
-
carton-lwt
< "0.4.4"
-
conduit-async
= "3.0.0"
-
conduit-lwt
= "3.0.0"
-
conduit-mirage
= "3.0.0"
- conduit-tls
-
dream-httpaf
= "1.0.0~alpha2"
-
encore
>= "0.3" & < "0.6"
-
git
>= "2.1.0"
- git-cohttp
- git-cohttp-mirage
- git-cohttp-unix
-
git-mirage
>= "3.0.0"
-
git-unix
>= "3.0.0"
-
gluten
>= "0.3.0" & < "0.5.0"
-
gluten-lwt
= "0.3.0"
- mimic
- mrmime
-
multipart_form
< "0.4.1" | >= "0.6.0"
- multipart_form-eio
- multipart_form-lwt
- paf
- prettym
-
sendmail
>= "0.6.0"
- spoke
- unstrctrd
Conflicts
None