More aggressive dictionary removal?

Conal Elliott conal at conal.net
Thu Jan 28 18:12:45 UTC 2016


Hah! I had misread the signatures in the Core output. I'm getting exactly
the dictionary removal I wanted. Fantastic!

I'm attaching my sample source code and the Core it produces.

Sorry for the misdirection, and kudos for specialis/zation in GHC!

-- Conal

On Thu, Jan 28, 2016 at 4:54 AM, Simon Peyton Jones <simonpj at microsoft.com>
wrote:

> Aggressive inlining is one way, but specialisation ought to get a long
> way, and makes fewer copies of the specialised code.
>
>
>
> It’s hard to help without a concrete example
>
>
>
> Simon
>
>
>
> *From:* ghc-devs [mailto:ghc-devs-bounces at haskell.org] *On Behalf Of *Conal
> Elliott
> *Sent:* 28 January 2016 00:05
> *To:* ghc-devs at haskell.org
> *Subject:* More aggressive dictionary removal?
>
>
>
> I'm looking for pointers on getting GHC to eliminate more overloading &
> polymorphism. I think this sort of thing mainly happens in the Specialise
> module. The default GHC flag settings get me a couple levels of
> monomorphization and dictionary removal, but I want to go further. I've
> tried -fspecialise-aggressively, but it didn't seem to make a difference,
> and I haven't found this flag described in the GHC user's guide. Anyone
> have pointers to more information?
>
> Thanks, - Conal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160128/4c7fae25/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SpecT.dump-simpl
Type: application/octet-stream
Size: 19512 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160128/4c7fae25/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SpecT.hs
Type: text/x-haskell
Size: 1057 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160128/4c7fae25/attachment-0001.hs>


More information about the ghc-devs mailing list