caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: William Chesters <williamc@paneris.org>
To: caml-list@inria.fr
Subject: [Caml-list] the importance of strictness
Date: Mon, 11 Jun 2001 20:53:09 +0200 (CEST)	[thread overview]
Message-ID: <15141.5013.991791.478253@beertje.william.bogus> (raw)
In-Reply-To: <20010611082947.B59230@caddr.com>

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,
William
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


      reply	other threads:[~2001-06-11 18:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-11 15:29 Miles Egan
2001-06-11 18:53 ` William Chesters [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15141.5013.991791.478253@beertje.william.bogus \
    --to=williamc@paneris.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).