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
it. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On | Behalf Of Duncan Coutts | Sent: 18 April 2007 08:22 | To: GHC Users Mailing List | Subject: {-# INLINE me_harder #-} | | So I'm trying to program the GHC term rewriting system again (ie the | mighty

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

{-# INLINE me_harder #-}

2007-04-18 Thread Duncan Coutts
So I'm trying to program the GHC term rewriting system again (ie the mighty simplifier) and it's not doing what I want it to do without me using unnecessarily large hammers. The crux is that I have a simple function that I want to be inlined early so that my other rules can match on the thing it

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