Really bad code for single method dictionaries?
ndmitchell at gmail.com
Thu Mar 26 19:48:45 EDT 2009
While experimenting with Uniplate I found that 1-member dictionaries
were faster than N element dictionaries - which seems to run against
what you see in the comment. 1-member dictionaries being cheaper does
make sense as then instead of passing a tuple containing functions,
you can pass the direct function, and save yourself a (cheap) selector
call at every use.
On Thu, Mar 26, 2009 at 11:29 PM, Jason Dusek <jason.dusek at gmail.com> wrote:
> I was reading the stream fusion code today and came across a comment stating
> that single element dictionaries interacted poorly with GHC's optimizer:
> class Unlifted a where
> expose [...]
> -- | This makes GHC's optimiser happier; it sometimes produces really bad
> -- code for single-method dictionaries
> unlifted_dummy [...]
> A cursory search on GHC's Trac shows no corresponding bug; is this no longer
> a problem? A small problem? I would like to know more about it.
> Jason Dusek
> |...stream fusion code...|
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
More information about the Glasgow-haskell-users