caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jens Olsson <jenso@csd.uu.se>
To: "Jan Brosius" <jan.brosius@village.uunet.be>
Cc: "OCAML" <caml-list@inria.fr>
Subject: Reply to: speed versus C
Date: Wed, 6 Oct 1999 09:58:47 +0200 (MET DST)	[thread overview]
Message-ID: <14331.311.774883.935054@zeppo.csd.uu.se> (raw)
In-Reply-To: <000f01bf0de7$2f626fd0$240cbed4@jannt>

Hello,

On Sun, 3 October 1999 Jan Brosius (jan.brosius@village.uunet.be) wrote:
>Hi, is there anything known about the efficiency of compiled Ocaml code
>compared with C/C++

I'm very interested in this as well. I've made a small program to test
this, namely a ray tracer. Ray tracing as a problem is quite suitable
for functional programming languages and as I have written one in C
too; I wanted to compare. I've now written yet another one in
Ocaml. I'm not entirely finished but my preliminary testing shows
that the tracer written in ML can be not more than 30%-50% slower than
the C version. The C version used to compare with is quite optimized
using various compiler flags and other tricks but they are quite
similar in an algorithmic point of view.

My Ml tracer is written in a quite naive manner (with more concern on
abstractions than speed) so it may/should be possible to speed it up
more. My intention is to 'release' it in order to encourage people to
come with suggestions on how to make it faster and better.

Ok, enough about that. As an answer to your question; Ocaml is *fast*
and by selecting problems suitable for functional languages and by
taking advantage of the features given by them one can get equally
fast or even faster programs than corresponding C programs. I'd love
to have a working example to show any person in doubt and it is my
intention to make one.

regards

Jens Olsson

--
--[ Jens Olsson ]-----------------------------------------------------
  [Address]            [Phone]                 [WWW]
  Djäknegatan 13, 1tr  Home: 018 -  24 88 77   jenso@csd.uu.se     
  754 23 Uppsala       Work: 018 - 471 76 85   www.csd.uu.se/~jenso
  SWEDEN               Cell: CEASED!!!         ICQ UID 8955231
---------------------------------[ CS student @ Uppsala University ]--




      parent reply	other threads:[~1999-10-06 14:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-03 21:35 Jan Brosius
1999-10-04 21:59 ` skaller
1999-10-05 23:22   ` chet
1999-10-06 10:22     ` skaller
1999-10-05 20:20 ` Gerd Stolpmann
1999-10-06 15:21   ` William Chesters
1999-10-06 22:49     ` Gerd Stolpmann
1999-10-07 10:26       ` Michel Quercia
1999-10-07 10:46       ` William Chesters
1999-10-07 15:48         ` Pierre Weis
1999-10-07 19:21         ` Gerd Stolpmann
1999-10-08  0:26           ` William Chesters
1999-10-10 16:27             ` Gerd Stolpmann
1999-10-10 20:48               ` William Chesters
1999-10-10 23:54                 ` Alain Frisch
1999-10-11 17:58                   ` William Chesters
1999-10-12 14:36                     ` Ocaml Machine (was Re: speed versus C) Alain Frisch
1999-10-12 15:32                       ` David Monniaux
1999-10-12 15:42                         ` Alain Frisch
1999-10-11 19:32                   ` speed versus C John Prevost
1999-10-11 20:50                 ` Gerd Stolpmann
1999-10-12 20:07                   ` skaller
1999-10-08  9:56           ` Pierre Weis
1999-10-07 15:25     ` Markus Mottl
1999-10-07  6:56   ` skaller
1999-10-07 12:37     ` Xavier Urbain
1999-10-07 22:18     ` Gerd Stolpmann
1999-10-08 19:15       ` skaller
1999-10-08 13:40   ` Anton Moscal
1999-10-06  7:58 ` Jens Olsson [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=14331.311.774883.935054@zeppo.csd.uu.se \
    --to=jenso@csd.uu.se \
    --cc=caml-list@inria.fr \
    --cc=jan.brosius@village.uunet.be \
    /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).