caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@maxtal.com.au>
To: Gerd.Stolpmann@darmstadt.netsurf.de
Cc: William Chesters <williamc@dai.ed.ac.uk>, caml-list@inria.fr
Subject: Re: speed versus C
Date: Wed, 13 Oct 1999 06:07:47 +1000	[thread overview]
Message-ID: <38039513.41E0B135@maxtal.com.au> (raw)
In-Reply-To: <99101201303001.12255@ice>

Gerd Stolpmann wrote:

> I was surprised by Caml when I tried it because it was not so slow than I
> expected. My point is that there are even some practically useful constructs in
> Caml which are faster than the construct a programmer would typically choose in
> the same situation in the "traditional" language. I can even imagine that
> functional languages are some day faster than traditional ones because medium-
> and high-level optimizations are better applicable. But this is only a dream.

I do not think it is a dream at all, but current reality with ocaml,
using it where it performs well. For example, a naive interpreter
for Python in ocaml is bound to be slower than C. However,
much sophistication is possible, such as infering types,
eliding dynamic lookup by string names, and recognising various
patterns, which, when implemented in C, would likely cost
a similar amount of processor time -- and take 10-100 times
longer to code, and remain unreliable. Perhaps C++ would
reduce the coding time to only 10 times longer, and improve
the reliability. But, for example, to add GC to Python,
is non-trivial in C, whereas in ocaml it is quite easy :-)

Consider also, FISh is an algol like language, like Ocaml
mixing functional and imperative features, and it 
outperforms C and Fortran for the same applications.
[For example, FISh quicksort is faster than the C
standard library qsort, because there is no function
calling overhead]

I think my point is that it isn't 'only a dream',
many people are not only dreaming, but implementing
some of it. [including the ocaml developers, for many years now].

-- 
John Skaller, mailto:skaller@maxtal.com.au
1/10 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
downloads: http://www.triode.net.au/~skaller




  reply	other threads:[~1999-10-13  7:10 UTC|newest]

Thread overview: 36+ 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 [this message]
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 ` Reply to: " Jens Olsson
1999-10-07 13:00 STARYNKEVITCH Basile
1999-10-08  6:57 Pascal Brisset
     [not found] <Pine.LNX.4.03.9910081713230.31666-100001@post.tepkom.ru>
1999-10-10  4:51 ` skaller
1999-10-11  9:08   ` Anton Moscal
1999-10-12 13:21 Damien Doligez
1999-10-12 20:42 ` skaller

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=38039513.41E0B135@maxtal.com.au \
    --to=skaller@maxtal.com.au \
    --cc=Gerd.Stolpmann@darmstadt.netsurf.de \
    --cc=caml-list@inria.fr \
    --cc=williamc@dai.ed.ac.uk \
    /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).