psqueues: Pure priority search queues
A priority search queue manages a set of triples of the form
(key, priority, value)
and allows for efficient lookup by key, and
efficient lookup and removal of the element with minimal priority. This
package contains three, performant implementations of priority search
queues, which differ in the requirements on the type of keys.
IntPSQ
s are the most efficient structure, but require the keys to be of typeInt
.OrdPSQ
s just require the key to implement theOrd
typeclass, but are the slowest structures of the three.HashPSQ
s require the key to implement both theOrd
andHashable
typeclasses. They use anIntMap
over the hash of the keys combined with aOrdPSQ
to manage collisions. Except for keys with a very fast comparison and small smapsHashPSQ
s are faster thanOrdPSQ
s.
Typical use cases for priority search queues are LRU caches, where the priority is the time of the last access, and timeout management, where the priority is the time at which the timeout should trigger.
Downloads
- psqueues-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.1.0.0, 0.1.0.1, 0.1.1.0, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.1.0, 0.2.2.0, 0.2.2.1, 0.2.2.2, 0.2.2.3, 0.2.3.0, 0.2.4.0, 0.2.5.0, 0.2.6.0, 0.2.7.0, 0.2.7.1, 0.2.7.2, 0.2.7.3, 0.2.8.0, 0.2.8.1 |
---|---|
Dependencies | base (>=4.2 && <5), deepseq (>=1.2 && <1.4), ghc-prim, hashable (>=1.2.1 && <1.3) [details] |
License | BSD-3-Clause |
Author | |
Maintainer | haskell@better.com |
Revised | Revision 1 made by HerbertValerioRiedel at 2019-01-08T18:52:35Z |
Category | Data Structures |
Bug tracker | https://github.com/bttr/psqueues/issues |
Source repo | head: git clone http://github.com/bttr/psqueues.git |
Uploaded | by JasperVanDerJeugt at 2014-06-23T13:53:14Z |
Distributions | Arch:0.2.8.1, Debian:0.2.7.2, Fedora:0.2.8.0, LTSHaskell:0.2.8.1, NixOS:0.2.8.0, Stackage:0.2.8.1, openSUSE:0.2.8.1 |
Reverse Dependencies | 37 direct, 3673 indirect [details] |
Downloads | 73910 total (33 in the last 30 days) |
Rating | 2.5 (votes: 3) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Successful builds reported [all 1 reports] |