can a lazy language give fast code?

Hi, Can one write withthe Haskell compliler faster code than in the examples of http://www.bagley.org/~doug/shootout/ where GHC (old Haskell 98?) seems to be much slower than Ocaml or Mlton both strict functional languages. Can one expect any improvements in speed in the future? Cheers Scott

Hi, On Mon, 29 Jul 2002, Scott J. wrote:
Can one write withthe Haskell compliler faster code than in the examples of http://www.bagley.org/~doug/shootout/ where GHC (old Haskell 98?) seems to be much slower than Ocaml or Mlton both strict functional languages. Can one expect any improvements in speed in the future?
There have been speed improvements in the past. I recommend reading Urban Boquists thesis where he describes a whole program Haskell compiler which generates pretty fast code. The thesis is very readable and I recommend it heartily to everyone with just the slightest interest in compiling lazy languages. It can be found here: http://www.cs.chalmers.se/~boquist/ While we're on the subject there are a few things that I need to let out. I think the reason why Haskell compilers aren't generating any faster code is that there is a lack of competition among different compilers. And I think that the lack of competition depends on that noone wants to write a front-end to Haskell. It's simply too complicated and too much boring work before one comes down to the interesting details. I know there is work on creating standardised front-ends and this is a step in the right direction. But the current state of affairs is the price we've had to pay to have such a feature-rich language. All the best, /Josef

G'day all. On Tue, Jul 30, 2002 at 01:57:58PM +0200, Josef Svenningsson wrote:
I think the reason why Haskell compilers aren't generating any faster code is that there is a lack of competition among different compilers. And I think that the lack of competition depends on that noone wants to write a front-end to Haskell.
There's no competition in Haskell compilers because there is no money in it. It might not even be "boring work" in most cases. The reality is that if there's no research quota or postgraduate degree to be gained, nobody will fund a university or other research institution to actually do the work. Cheers, Andrew Bromage

Andrew J Bromage
On Tue, Jul 30, 2002 at 01:57:58PM +0200, Josef Svenningsson wrote:
I think the reason why Haskell compilers aren't generating any faster code is that there is a lack of competition among different compilers. And I think that the lack of competition depends on that noone wants to write a front-end to Haskell.
There's no competition in Haskell compilers because there is no money in it. It might not even be "boring work" in most cases. The reality is that if there's no research quota or postgraduate degree to be gained, nobody will fund a university or other research institution to actually do the work.
I think the situation is more complex than this. First of all, there are three Haskell compilers (admittedly one of them isn't supported anymore). Secondly, there are at least three projects working at new Haskell compilers (of one, I am not sure whether it is still going) - this doesn't contradicting your point, though, as all three are research-oriented projects. Moreover, if you look at the available open source C compilers, then the situation is not that different. There is gcc, then a big gap, and then the rest. Incidentally, gcc has often been criticised for being difficult to build/port, being slow, and generating non-optimal code (sounds familar, doesn't it). Maybe the "market" (in the OSS sense) just doesn't have a very high demand for a lean and fast Haskell compiler. In other words, if you have a choice, would you take a fast compiler with no libraries or a fast enough compiler with plenty of libraries? (I think, that fits very well with your own argument about most applications having spare cycles.) Finally, there is a tendency of alternative OSS projects specialising in different areas (eg, nhc is extremely portable and focuses on debugging infrastructure). Cheers, Manuel

I cannot open the files you mentioned in http://www.cs.chalmers.se/~boquist/
My acrobat Distiller complains and my winzip 8.1 program complains (for the
gzipped postcript file) that it is not a valid archive. Anyway I am still
interested to read it.
Regards
John Scott
----- Original Message -----
From: "Josef Svenningsson"
Hi,
On Mon, 29 Jul 2002, Scott J. wrote:
Can one write withthe Haskell compliler faster code than in the examples of http://www.bagley.org/~doug/shootout/ where GHC (old Haskell 98?) seems to be much slower than Ocaml or Mlton both strict functional languages. Can one expect any improvements in speed in the future?
There have been speed improvements in the past. I recommend reading Urban Boquists thesis where he describes a whole program Haskell compiler which generates pretty fast code. The thesis is very readable and I recommend it heartily to everyone with just the slightest interest in compiling lazy languages. It can be found here:
http://www.cs.chalmers.se/~boquist/
While we're on the subject there are a few things that I need to let out.
I think the reason why Haskell compilers aren't generating any faster code is that there is a lack of competition among different compilers. And I think that the lack of competition depends on that noone wants to write a front-end to Haskell. It's simply too complicated and too much boring work before one comes down to the interesting details. I know there is work on creating standardised front-ends and this is a step in the right direction. But the current state of affairs is the price we've had to pay to have such a feature-rich language.
All the best,
/Josef
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (4)
-
Andrew J Bromage
-
Josef Svenningsson
-
Manuel M T Chakravarty
-
Scott J.