gnu-arch-users
[Top][All Lists]
Advanced

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

[Gnu-arch-users] Re: darcs vs tla


From: Kannan Goundan
Subject: [Gnu-arch-users] Re: darcs vs tla
Date: Tue, 9 Nov 2004 18:54:02 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

> That sort of thing is why darcs is slow. Optimising Haskell programs
> is more or less equally difficult as optimising C programs (functional
> languages are not inherently any easier or harder to optimise), and
> the problems are pretty much the same. tla even has analogous issues
> (it tackles this problem differently, and I think does a little
> better in the amortised case, but it's far from optimal).

Since Haskell is, in a way, more strict and more restrictive, wouldn't it be
easier for a compiler to optimize Haskell programs (since the code is bounded by
stronger guarantees)?  Dealing with side-effects and aliasing is a major pain
for C compilers.

C has an advantage because it's easier for a programmer to manually perform
low-level optimizations (stuff that compilers aren't yet smart enough to perform
by themselves).  With Haskell, you're working at such a high level that it's
difficult to predict exactly how your code will translate into ASM, making it
harder to "coerce" the compiler into generating code in a certain way. 
Haskell's lazy evaluation also adds to this problem.  (Of course, there are
probably Haskell experts who know exactly how their code will be compiled, but
it is definitely harder).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]