More aggressive dictionary removal?

Johan Tibell johan.tibell at gmail.com
Thu Jan 28 13:40:22 UTC 2016


I think the difference between the inlinable and specialize pragma is
whether the specialization needs to be driven by the call site or not. If
you have a handful of known types you want to specialize for up front, you
can use the specialize pragma. If the set is large or unknown (like in the
case of container keys/value, the inlinable pragma does the right thing.)

On Thu, Jan 28, 2016 at 1:54 PM, 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
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160128/d9c1dd15/attachment.html>


More information about the ghc-devs mailing list