List fusion for IntSet.toList

Joachim Breitner mail at
Wed Sep 21 19:56:50 CEST 2011


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.


Joachim "nomeata" Breitner
  mail at  |  nomeata at  |  GPG: 0x4743206C
  xmpp: nomeata at |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot.png
Type: image/png
Size: 6682 bytes
Desc: not available
URL: <>
-------------- 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: <>

More information about the Libraries mailing list