Re: {-# INLINE me_harder #-}

2007-05-12 Thread Duncan Coutts
On Fri, 2007-05-11 at 16:05 -0400, Isaac Dupree wrote: Simon Peyton-Jones wrote: It's very difficult to get inlining right all the time. Even for a function marked INLINE, there's really no point in inlining in some contexts. E.g. map f xs (don't inline f). Would it make

Re: {-# INLINE me_harder #-}

2007-05-12 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Duncan Coutts wrote: Also, uninlining is nigh on impossible. I would say that's the critical problem with my notion... Why is it so difficult? Is it because it's too easy for some minor optimization/change to be made in the Core representation,

RE: {-# INLINE me_harder #-}

2007-05-11 Thread Simon Peyton-Jones
Duncan I've been meaning to reply to this. It's very difficult to get inlining right all the time. Even for a function marked INLINE, there's really no point in inlining in some contexts. E.g. map f xs (don't inline f). Furthermore, for parameter-less things like 'word8' GHC has to

Re: {-# INLINE me_harder #-}

2007-05-11 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Peyton-Jones wrote: It's very difficult to get inlining right all the time. Even for a function marked INLINE, there's really no point in inlining in some contexts. E.g. map f xs (don't inline f). Would it make sense to

Re: {-# INLINE me_harder #-}

2007-05-07 Thread John Meacham
On Wed, Apr 18, 2007 at 08:07:45AM -0400, Isaac Dupree wrote: Jhc has a pragma named SUPERINLINE that just means try even harder to inline this, I think, e.g. it has {-# SUPERINLINE id, const, (.), ($), ($!), flip #-} It just reminded me of the name -- I'm not sure whether it actually makes

Re: {-# INLINE me_harder #-}

2007-04-18 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jhc has a pragma named SUPERINLINE that just means try even harder to inline this, I think, e.g. it has {-# SUPERINLINE id, const, (.), ($), ($!), flip #-} It just reminded me of the name -- I'm not sure whether it actually makes sense to use that