[Haskell-cafe] ANNOUNCE: persistent-vector-

Alberto G. Corona agocorona at gmail.com
Wed Aug 29 19:13:38 CEST 2012

Where the "persistent" part of the name comes from?. It can be
serialized/deserialized from a persistent storage automatically or on

2012/8/29 Tristan Ravitch <travitch at cs.wisc.edu>

> I uploaded a package implementing persistent vectors using array
> mapped tries (based on the implementation in clojure).  Version
> was broken, so I am starting off with
>   http://hackage.haskell.org/package/persistent-vector
> Persistent vectors are a sequence container offering efficient and
> purely functional append (snoc), indexing, and updates.  This is
> similar to Data.Sequence from containers.  The array mapped trie
> is closely related to the data structure used in the
> unordered-containers package.
> Comparison to Sequence:
>  * Faster indexing and append
>  * Slightly slower updates to existing elements
>  * O(1) slicing
>  * Sequence offers efficient prepend and concatenate
>    (persistent-vector does not implement prepend, while concatenate is
>    O(n)).
> I tried to model the API after Sequence as much as was reasonable, but
> a few functions are still missing.  Some are reasonable to implement
> and some would be difficult to make efficient.  The results from
> criterion (mostly comparing against Sequence and IntMap) are posted
> here:
>   http://pages.cs.wisc.edu/~travitch/pvec.html
> The *Vec* runs are the vectors from this package and IM and Seq are
> IntMap and Sequence from containers.
> Hopefully someone will find this useful.  Comments and suggestions are
> definitely welcome for anything: API, implementation, test suite, or
> benchmarks.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120829/1b61c63a/attachment.htm>

More information about the Haskell-Cafe mailing list