Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] the importance of strictness
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-06-11 (18:49)
From: William Chesters <williamc@p...>
Subject: [Caml-list] the importance of strictness
Miles Egan writes:
 > While perusing the results of the last several ICFP contests, I've been struck
 > by the fact that teams using Haskell often manage to write correct programs,
 > they are almost always slower than the Ocaml entries.  My impression is that the
 > Ocaml advantage is at least partially due to a more efficient compiler.  Is this
 > because more effort has been devoted to optimizing the Ocaml compiler or is it
 > because a strict language is simpler to implement and leaves more room for
 > optimization?

A bit of both.  To make really efficient Haskell you have to work to
help the compiler strictify your code (and often to deforest it using
the rewrite rules).  Basically the semantics of lazy lambda calculus
are a rotten match for really existing hardware and they simply cannot
be implemented efficiently without transformations the compiler won't
be able to do for itself for the forseeable future.

(Unboxing seems to be pretty much as good as ocaml's though.)

Then the backend is still much less good than ocaml's, even using
-via-C as they recommend: their generated C tries to micromanage the
stack rather than just declaring values as variables, with the result
that gcc, at least, puts nothing in a register.

>From my brief experiemnts a few weekends ago,
Bug reports:  FAQ:
To unsubscribe, mail  Archives: