[Fwd: Re: [clean-list] Clean versus Haskell]

Isaac Gouy igouy2 at yahoo.com
Thu Oct 15 17:40:46 MEST 2009



--- On Thu, 10/15/09, Simon Peyton-Jones <simonpj at microsoft.com> wrote:

> From: Simon Peyton-Jones <simonpj at microsoft.com>
> Subject: RE: [Fwd: Re: [clean-list] Clean versus Haskell]
> To: "Adrian Hey" <ahey at iee.org>, "clean-list at science.ru.nl" <clean-list at science.ru.nl>
> Date: Thursday, October 15, 2009, 12:22 AM
> I submitted Philippos as a
> performance bug to GHC's trac, here:
>     http://hackage.haskell.org/trac/ghc/ticket/3586
> 
> If you follow the link you'll see lots of commentary,
> including a version that generates code twice as fast as
> Clean's, and is purely functional.
> 
> That said, I think it's v bad that a straightforward
> program runs so slowly, and it's certainly true that this is
> an area we could pay more attention to.  (Trouble is,
> there are so many such areas!)
> 
> Meanwhile, I'm curious: are the arrays in Philippos's
> program strict?  Or lazy?  If strict, that's a
> pretty big difference.  (The "STU" arrays mentioned in
> the above link are strict and unboxed; that's what the "U"
> means.)
> 
> Simon


I'm curious too - does the answer depend on whether the strictness analyzer is enabled (strict context?) or is an unboxed array always strict?

strictness analyzer - off

"arraytest"
fn :: Int *(a Real) Real -> Real | Array a Real
vt :: .{#Real}
fn :: Int *{#Real} Real -> Real
Start :: Real

280000000
Execution: 1.81  Garbage collection: 0.01  Total: 1.82


strictness analyzer - on

"arraytest"
fn :: !Int *(a Real) !Real -> Real | Array a Real
vt :: .{#Real}
fn :: !Int *{#Real} !Real -> Real
Start :: Real

280000000
Execution: 0.15  Garbage collection: 0.00  Total: 0.15


      



More information about the clean-list mailing list