[Haskell-cafe] Re: Climbing up the shootout...

wren ng thornton wren at freegeek.org
Tue Sep 23 23:20:28 EDT 2008


ChrisK wrote:
> And, though I had never seen it before, the current winner for speed is 
> "ATS" ( http://www.ats-lang.org/ ) which is dependently-typed functional 
> language.

And as discussed on Reddit recently[1] it uses a good deal of embedded 
C/C++ and so is subject to the same non-idiomatic complaints.

While the non-idiomatic complaint is a valid one, I think it's also 
overrated. Back in the day people said that an automatic compiler would 
never be able to out-perform hand-written assembly; and today gcc 
produces better assembly code than any mere mortal. Yet occasionally 
C/C++ programmers still feel the need to do the compiler's job. 
Similarly, if ATS or Haskell lets one write better C/C++ than any mere 
mortal, then it has won-- even if programmers feel the need to do the 
compiler's job from time to time. Compilers for any language will never 
be omniscient, but they're far more consistent about applying known 
optimization patterns globally.

While some tasks do require absolute performance, high-level languages 
seek to optimize programmer time which is far more valuable than cpu 
time for the great majority of tasks. The optimization techniques for 
Haskell are quite different than for C, but I wouldn't say they are 
inherently "harder" in any real sense. Optimizing Haskell requires a 
deep understanding of the runtime internals of ghc (or other compiler of 
choice); optimizing C requires a deep understanding of the runtime 
internals of C's memory 'runtime'. The only difference I see is that C's 
view of the world is taught as canon and has been a target of research 
for longer.


[1] 
http://www.reddit.com/r/programming/comments/72hmw/language_shootout_ats_is_the_new_top_gunslinger/

-- 
Live well,
~wren


More information about the Haskell-Cafe mailing list