Re: Inliner behaviour - tiny changes lead to huge performance differences

2009-11-17 Thread Bryan O'Sullivan
On Tue, Nov 17, 2009 at 12:24 AM, Simon Peyton-Jones wrote: > To be honest I’m not terribly enthusiastic about trying to nail down > exactly what’s happening in 6.10 and 6.12 because, although they are indeed > the compilers people will be using, it’s otherwise wasted work because the > HEAD is s

RE: Inliner behaviour - tiny changes lead to huge performance differences

2009-11-17 Thread Simon Peyton-Jones
bject: Re: Inliner behaviour - tiny changes lead to huge performance differences On Fri, Nov 13, 2009 at 12:26 AM, Simon Peyton-Jones mailto:simo...@microsoft.com>> wrote: My goal is for INLINE pragmas to be very predictable. I can't decode your message enough to offer any insights;

Re: Inliner behaviour - tiny changes lead to huge performance differences

2009-11-16 Thread Bryan O'Sullivan
On Fri, Nov 13, 2009 at 12:19 AM, Roman Leshchinskiy wrote: Let's see if I understand this correctly. In your code, decodeUtf8 calls > streamUtf8. They both get inlined into main but then unsafeChr8 does not. > Correct? > Here's what I see in the simplifer output with 6.10.4: the *unoptimised*bo

Re: Inliner behaviour - tiny changes lead to huge performance differences

2009-11-16 Thread Bryan O'Sullivan
On Fri, Nov 13, 2009 at 12:26 AM, Simon Peyton-Jones wrote: > My goal is for INLINE pragmas to be very predictable. I can't decode your > message enough to offer any insights; thank you Roman, who is closer to it, > for helping. > Things are considerably different with HEAD than with 6.10.4. HE

Re: Inliner behaviour - tiny changes lead to huge performance differences

2009-11-13 Thread David Menendez
On Fri, Nov 13, 2009 at 2:04 AM, Bryan O'Sullivan wrote: > > And the lengthI function is defined more generally, in the hope that I could > use it for both Int and Int64 lengths: > > lengthI :: Integral a => Stream Char -> a > lengthI (Stream next s0 _len) = loop_length 0 s0 >     where >       lo

Re: Inliner behaviour - tiny changes lead to huge performance differences

2009-11-13 Thread Simon Marlow
On 13/11/2009 07:04, Bryan O'Sullivan wrote: I'm working on measuring and improving the performance of the text library at the moment, and the very first test I tried demonstrated a piece of behaviour that I'm not completely able to understand. Actually, I'm not able to understand what's going on

RE: Inliner behaviour - tiny changes lead to huge performance differences

2009-11-13 Thread Simon Peyton-Jones
Bryan | I'm working on measuring and improving the performance of the text library at the | moment, and the very first test I tried demonstrated a piece of behaviour | that I'm not completely able to understand. Actually, I'm not able to | understand what's going on at all, beyond a very shall

Re: Inliner behaviour - tiny changes lead to huge performance differences

2009-11-13 Thread Roman Leshchinskiy
On 13/11/2009, at 18:04, Bryan O'Sullivan wrote: main = do args <- getArgs forM_ args $ \a -> do s <- B.readFile a let t = T.decodeUtf8 s print (T.length t) The streamUtf8 function looks roughly like this: streamUtf8 :: OnDecodeError -> ByteString -> Stream Char streamUtf8 onEr