caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] O'Caml vs C++: a little benchmark revisited
@ 2002-09-04 11:57 malc
  0 siblings, 0 replies; only message in thread
From: malc @ 2002-09-04 11:57 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-05  7:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-04 11:57 [Caml-list] O'Caml vs C++: a little benchmark revisited malc

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).