[commit: containers] master: Add IntMap.mergeWithKey. (1e3c78c)
Paolo Capriotti
p.capriotti at gmail.com
Thu Jul 19 21:11:53 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/containers
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1e3c78cf788a5b09fd121546cb2e7cacadc19617
>---------------------------------------------------------------
commit 1e3c78cf788a5b09fd121546cb2e7cacadc19617
Author: Milan Straka <fox at ucw.cz>
Date: Sat Apr 14 16:55:46 2012 +0200
Add IntMap.mergeWithKey.
The slightly more general internal function mergeWithKey' is used to
define both mergeWithKey and other combining functions union*,
difference*, intersection*.
The resulting implementations of union*, difference* and intersection*
are no slower than before, and up to 30% faster in case of two large
interleaved maps. Measured by benchmarks/SetOperations-IntMap.hs.
Data/IntMap/Base.hs | 243 +++++++++++++++++++++-----------------------
Data/IntMap/Lazy.hs | 3 +
Data/IntMap/Strict.hs | 124 ++++++++++------------
tests/intmap-properties.hs | 32 ++++++
4 files changed, 207 insertions(+), 195 deletions(-)
Diff suppressed because of size. To see it, use:
git show 1e3c78cf788a5b09fd121546cb2e7cacadc19617
More information about the Cvs-libraries
mailing list