caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: malc <malc@pulsesoft.com>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] O'Caml vs C++: a little benchmark revisited
Date: Wed, 4 Sep 2002 15:57:33 +0400 (MSD)	[thread overview]
Message-ID: <Pine.LNX.4.44.0209041552570.4068-100000@home.oyster.ru> (raw)

First line for each test shows icc(gcc)'s timing, second ocaml's

lists
0.903(1.201)
1.304
arrays
0.397(0.397)
1.200(0.829 if loop was unrolled)
rev
4.707(14.073)
2.892
memory
1.191(1.069)
1.793
tree
1.064(0.854)
6.737(2.400 in case of manual/functor specialization)

lists deque 1.570(0.758)

Modified sources:
http://algol.prosalg.no/~malc/silly.tar.gz

(Linux kernel patch 2.4.19 was used for rev test)

Conclusion.

C++:
Tends to optimize out some computations if the result wasnt used.
Strings/streams are slow.

OCaml:
Polymorphic functions are slow.
Insn scheduler is less than perfect.
One must learn to live with existing floating point constraints.

-- 
mailto:malc@pulsesoft.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


                 reply	other threads:[~2002-09-05  7:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.44.0209041552570.4068-100000@home.oyster.ru \
    --to=malc@pulsesoft.com \
    --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).