Adding manual worker/wrapper transforms to Data.Map

Ian Lynagh igloo at
Thu Aug 19 12:52:19 EDT 2010

On Thu, Aug 19, 2010 at 11:38:10AM +0200, Johan Tibell wrote:
> I tried doing the "standard" worker/wrapper transform to some functions in
> Data.Map. For example, by transforming
>     insertWithKey' f kx x t0
>       = case t of
> to
>     insertWithKey' f kx x t0 = kx `seq` go t0
>       where
>         go t = case t of
> I got a 16% speedup on this benchmark:

Looks like as well as W/W you've also made it strict in the key, so this
speedup isn't all W/W.


More information about the Libraries mailing list