Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Functional Programming Group Meeting



On 2008-04-21 06:10 +0900 (Mon), Stephen J. Turnbull wrote:

> Curt Sampson writes:
> 
>  > I'm not sure what you mean by this. Haskell is right up there with other
>  > languages in terms of runtime speed. Ghc is an amazing compiler, of a
>  > quality on par with gcc.
> 
> Haskell encourages multiply recursive algorithms, even more than Lisp
> does.  These can easily result in exponential not-so-worst cases.  In
> the case of Darcs (http://darcs.net), this has resulted in unusability.

In the case of Darcs 1.x, yes. This is fixed in 2.0.

You may also want to re-examine other specific cases, if you've not
looked at ghc 6.8 yet. Things have been moving fast in the Haskell world
over the last couple of years.

> Several Haskell developers (including Simon Peyton-Jones) have
> acknowledged on the Darcs lists that ghc can be expensive both at
> compile-time and run-time, unless you really know what you're doing.

It can be, yes. There's no question in my mind that you need to learn
some different programming techniques to make effective use of Haskell;
it's a very different language.

While it's good to keep such things in mind, I think that, in general,
saying that Haskell is going to be slow unless "you really know what
you're doing" is not really a fair assessment; I've only been using
Haskell seriously for a month or so, but I've not found this to be the
case.

Sure, there are things like "use ByteString instead of String for
heavy string processing," but that's no different from Java's "use
StringBuffer instead of naive String concatenation for heavy string
processing." And there are areas where, e.g., the lazyness will make the
naive version of an algorithm work much faster than if you tried it in
other languages.

So at this point, if I were to warn someone to be careful to take some
time to understand what you're doing when you need good peformance in
Haskell, I'd have to give an equal warning for, say, Ruby, where I've
been nailed by plenty of similar issues.

cjs
-- 
Curt Sampson       <cjs@example.com>        +81 90 7737 2974   
Mobile sites and software consulting: http://www.starling-software.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links