Re: [Haskell-cafe] Why can't Haskell be faster?

2007-11-01 Thread Hugh Perkins
On 10/31/07, Paulo J. Matos <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I, along with some friends, have been looking to Haskell lately. I'm
> very happy with Haskell as a language, however, a friend sent me the
> link:
> http://shootout.alioth.debian.org/gp4/
>

Careful: it's worse than you think.  Many of the solutions to the
shootout test are using "imperative" Haskell.  "Real" "functional"
Haskell performs significantly slower.  (Orders of magnitude)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Why can't Haskell be faster?

2007-10-31 Thread Don Stewart
bf3:
> Are these benchmarks still up-to-date? When I started learning FP, I had 
> to choose between Haskell and Clean, so I made a couple of little 
> programs in both. GHC 6.6.1 with -O was faster in most cases, sometimes 
> a lot faster... I don't have the source code anymore, but it was based 
> on the book "The Haskell road to math & logic".

Could be in the better Haskell libraries? We only really have the
shootout programs, which are very small.
  
> However, the Clean compiler itself is really fast, which is nice, it 
> reminds me to the feeling I had with Turbo Pascal under DOS :-) I find 
> GHC rather slow in compilation. But that is another topic of course.

I find it comforting that GHC thinks so hard about my code. :)

-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Why can't Haskell be faster?

2007-10-31 Thread Peter Verswyvelen
Are these benchmarks still up-to-date? When I started learning FP, I had 
to choose between Haskell and Clean, so I made a couple of little 
programs in both. GHC 6.6.1 with -O was faster in most cases, sometimes 
a lot faster... I don't have the source code anymore, but it was based 
on the book "The Haskell road to math & logic".


However, the Clean compiler itself is really fast, which is nice, it 
reminds me to the feeling I had with Turbo Pascal under DOS :-) I find 
GHC rather slow in compilation. But that is another topic of course.


Peter

Paulo J. Matos wrote:

Hello all,

I, along with some friends, have been looking to Haskell lately. I'm
very happy with Haskell as a language, however, a friend sent me the
link:
http://shootout.alioth.debian.org/gp4/

which enables you compare several language implementations. Haskell
seems to lag behind of Clean.
>From what I've seen of Clean it seems almost like Haskell. It even
distributes a Haskell->Clean translator so the obvious question is,
why is Haskell slower?
Being similar languages and being GHC a very good compiler, can't it
get at least as fast as Clean?

What am I missing here? (I wrote this mail assuming the results from
the URL are trustworthy).

Cheers,

  


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Why can't Haskell be faster?

2007-10-31 Thread Adrian Hey

Paulo J. Matos wrote:

Hello all,

I, along with some friends, have been looking to Haskell lately. I'm
very happy with Haskell as a language, however, a friend sent me the
link:
http://shootout.alioth.debian.org/gp4/

which enables you compare several language implementations. Haskell
seems to lag behind of Clean.

From what I've seen of Clean it seems almost like Haskell. It even

distributes a Haskell->Clean translator so the obvious question is,
why is Haskell slower?
Being similar languages and being GHC a very good compiler, can't it
get at least as fast as Clean?

What am I missing here? (I wrote this mail assuming the results from
the URL are trustworthy).


I don't know for certain that this is still the case (and if so why).
But I do remember that when I was a Clean user a few years ago both
the Clean compiler and the resulting executables were amazingly fast
(certainly by FPL standards).

I've often thought it's a real shame that two different but very
similar languages exist. I think that the Clean compiler would
be one of the best if not *the* best Haskell implementations available,
apart from minor snag that it isn't Haskell at all :-)

As things are at the moment ghc has no serious competition so we don't
really know how fast it "should be". Maybe this will change in future.

BTW, the reason I still jumped ship in the end and became a Haskell
user instead had nothing to do with performance. The reason was that if
I was going to invest a lot of time in progs/libs I wanted to have some
confidence I'd made the right choice long term and I had issues with the
Clean approach to concurrency (what the Clean folk call "deterministic
concurrency"). I didn't (and still don't) see this as viable, but during
a long and heated flame war on the Clean mailing list it became clear
that the Clean team did not agree with my point of view, so things
were not likely to change any time soon :-(

Regards
--
Adrian Hey
















___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Why can't Haskell be faster?

2007-10-31 Thread manu

From what I've seen of Clean it seems almost like Haskell. It even


distributes a Haskell->Clean translator so the obvious question is,
why is Haskell slower?



It's also something I've wondered about, and I'm curious about the  
answer...


One of the differences between Haskell and Clean is how side-effects  
are allowed

(Uniqueness Types for Clean, and Monadic I/O for Haskell)

GHC also supports a lot of extensions beyong Haskell98.

Does it explain the difference in performances ? I don't know...

Experts please !


Manu


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Why can't Haskell be faster?

2007-10-31 Thread Paulo J. Matos
Hello all,

I, along with some friends, have been looking to Haskell lately. I'm
very happy with Haskell as a language, however, a friend sent me the
link:
http://shootout.alioth.debian.org/gp4/

which enables you compare several language implementations. Haskell
seems to lag behind of Clean.
>From what I've seen of Clean it seems almost like Haskell. It even
distributes a Haskell->Clean translator so the obvious question is,
why is Haskell slower?
Being similar languages and being GHC a very good compiler, can't it
get at least as fast as Clean?

What am I missing here? (I wrote this mail assuming the results from
the URL are trustworthy).

Cheers,

-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe