RE: SPECIALISE INLINE pragma

2017-03-27 Thread Simon Peyton Jones via ghc-devs
[mailto:miko...@well-typed.com] | Sent: 23 March 2017 21:15 | To: Simon Peyton Jones <simo...@microsoft.com> | Cc: Matthew Pickering <matthewtpicker...@gmail.com>; GHC developers | <ghc-devs@haskell.org> | Subject: Re: SPECIALISE INLINE pragma | | > GHC tries hard NOT to choo

Re: SPECIALISE INLINE pragma

2017-03-23 Thread Mikolaj Konarski
> GHC tries hard NOT to choose an INLINE function as a loop breaker. But if > you write > > f x = if ... then 0 else (f x') > {-# INLINE f #-} > > then the only possible loop breaker is 'f', so GHC has to choose it. Indeed. > What else would you suggest? A warning would be very welcome. Given

Re: SPECIALISE INLINE pragma

2017-03-22 Thread Matthew Pickering
Thanks Simon. I made a page for it here - https://wiki.haskell.org/Inlining_and_Specialisation Matt On Wed, Mar 22, 2017 at 10:50 AM, Simon Peyton Jones wrote: > | On the same topic, I also wrote a blog post simply explaining the > | essential things to know about the

RE: SPECIALISE INLINE pragma

2017-03-22 Thread Simon Peyton Jones via ghc-devs
<matthewtpicker...@gmail.com> | Cc: GHC developers <ghc-devs@haskell.org> | Subject: Re: SPECIALISE INLINE pragma | | > On the same topic, I also wrote a blog post simply explaining the | > essential things to know about the inliner and specialiser as I | don't | > thi

RE: SPECIALISE INLINE pragma

2017-03-22 Thread Simon Peyton Jones via ghc-devs
| On the same topic, I also wrote a blog post simply explaining the | essential things to know about the inliner and specialiser as I don't | think they are generally appreciated. Comments welcome! | | http://mpickering.github.io/posts/2017-03-20-inlining-and- | specialisation.html

Re: SPECIALISE INLINE pragma

2017-03-20 Thread Mikolaj Konarski
> On the same topic, I also wrote a blog post simply explaining the > essential things to know > about the inliner and specialiser as I don't think they are generally > appreciated. Comments welcome! > > http://mpickering.github.io/posts/2017-03-20-inlining-and-specialisation.html LGTM. I'd