List fusion for IntSet.toList

Joachim Breitner mail at joachim-breitner.de
Wed Sep 21 19:56:50 CEST 2011


Hi,

while experimenting with the code, I noticed that toList is not set up
for list fusion. I’m using IntSet.toList (and IntMap.toList) a lot
inside list comprehensions, so I think I’d benefit from it. I ran a
quick experiment (benchmarking (length . filter odd . DS.toList) applied
to fromList [0,2..2^24], and progression gave me the attached graph –
looks worth-while :-)

(Yes, I know, the benchmark is very much tailored to show the best
possible effect :-))

As it is really easy and straight forward, I’ll add such a rule for
IntSet and for the other modules in my pull request.

Greetings,
Joachim


-- 
Joachim "nomeata" Breitner
  mail at joachim-breitner.de  |  nomeata at debian.org  |  GPG: 0x4743206C
  xmpp: nomeata at joachim-breitner.de | http://www.joachim-breitner.de/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot.png
Type: image/png
Size: 6682 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/libraries/attachments/20110921/baadfc68/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/libraries/attachments/20110921/baadfc68/attachment.pgp>


More information about the Libraries mailing list