{"id":13726211,"url":"https://github.com/mirage/ke","last_synced_at":"2025-04-29T01:31:11.766Z","repository":{"id":33798955,"uuid":"161356337","full_name":"mirage/ke","owner":"mirage","description":"Fast implementation of queue in OCaml","archived":false,"fork":false,"pushed_at":"2024-02-26T07:35:15.000Z","size":248,"stargazers_count":51,"open_issues_count":0,"forks_count":6,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-04-20T21:41:50.507Z","etag":null,"topics":["gadt","ocaml","queue"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirage.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-12-11T15:42:30.000Z","updated_at":"2025-01-24T11:29:27.000Z","dependencies_parsed_at":"2024-01-03T01:31:10.851Z","dependency_job_id":"354447dd-d9b2-4cb2-ba20-a48bf0cae9bf","html_url":"https://github.com/mirage/ke","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Fke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Fke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Fke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Fke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirage","download_url":"https://codeload.github.com/mirage/ke/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251415728,"owners_count":21585881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gadt","ocaml","queue"],"created_at":"2024-08-03T01:02:55.861Z","updated_at":"2025-04-29T01:31:11.245Z","avatar_url":"https://github.com/mirage.png","language":"HTML","funding_links":[],"categories":["Algorithms and Data Structures","OCaml"],"sub_categories":[],"readme":"Ke - Fast implementation of Queue in OCaml\n==========================================\n\n![travis-ci](https://travis-ci.org/mirage/ke.svg?banch=master)\n\nQueue or FIFO is one of the most famous data-structure used in several\nalgorithms. `Ke` provides some implementations of it in a functional or\nimperative way.\n\nIt is a little library with a benchmark\n([`bechamel`](https://github.com/dinosaure/bechamel.git) or `core_bench`),\na fuzzer and tests.\n\nWe provide a functional interface `Fke` or an imperative interface `Rke`.\n\nFrom what we know, `Ke.Rke` is faster than `Queue` from the\nstandard library or the `base` package. The type of data that it can store\nis limited (only supports the types supported by [`Bigarray.kind`](https://v2.ocaml.org/releases/5.1/api/Bigarray.html#TYPEkind))\n, but this is enough for a lot of algorithms. The fast\noperations are: put some elements faster than a sequence of `Queue.push`, and\nget some elements faster than a sequence of `Queue.pop`.\n\nWe provide extended implementations (`Rke.Weighted` and `Fke.Weighted`) with\na limit on the number of elements stored. The purpose is to limit memory\nconsumption of the queue when we use it in some contexts (like _encoder_).\n\nAgain, as a part of the MirageOS project, `Ke` does not rely on C stubs,\n`Obj.magic` and so on.\n\nAuthor: Romain Calascibetta \u003cromain.calascibetta@gmail.com\u003e\n\nDocumentation: https://mirage.github.io/ke/\n\nImplementation notes\n====================\n\nThe functional implementation `Fke` comes from Okazaki's queue\nimplementation with GADT to discard impossible cases.\n\n`Rke`, `Rke.Weighted` and `Fke.Weighted` are limited by kind and follow Xen's\nimplementation of the shared memory ring-buffer. The length of the internal buffer\nis always a power of two - that means for a large number of elements\nthis kind of queue may not fit your requirements.\n\nA fuzzer was made to compare the standard `Queue` (as an oracle) with `Rke` and\n`Fke`. We construct a set of actions (`push` and `pop`) and ensure (by GADT) to\nnever `pop` an empty queue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirage%2Fke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirage%2Fke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirage%2Fke/lists"}