From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA24627; Sun, 18 Aug 2002 21:58:23 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA24612 for ; Sun, 18 Aug 2002 21:58:22 +0200 (MET DST) Received: from hickory.cc.columbia.edu (hickory.cc.columbia.edu [128.59.59.202]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g7IJvjj19739 for ; Sun, 18 Aug 2002 21:57:58 +0200 (MET DST) Received: from there (tw304h3.cpmc.columbia.edu [156.111.84.180]) by hickory.cc.columbia.edu (8.9.3/8.9.3) with SMTP id PAA08736 for ; Sun, 18 Aug 2002 15:57:42 -0400 (EDT) Message-Id: <200208181957.PAA08736@hickory.cc.columbia.edu> Content-Type: text/plain; charset="iso-8859-1" From: Oleg To: "caml-list" Subject: Re: [Caml-list] O'Caml vs C++: a little benchmark Date: Sun, 18 Aug 2002 15:58:07 -0400 X-Mailer: KMail [version 1.3.2] References: <200208181716.NAA10426@hickory.cc.columbia.edu> <20020818191613.GC8185@fichte.ai.univie.ac.at> In-Reply-To: <20020818191613.GC8185@fichte.ai.univie.ac.at> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sunday 18 August 2002 03:16 pm, Markus Mottl wrote: > My timings differ considerably (AMD Athlon 800 MHz 256 MB RAM; g++-2.96; > demo_all.sh instead of demo_all_root.sh): g++-3.2 removes abstraction penalty related to iterators, etc. [...] > Note, btw., that I have measured user time: real time, which you have > chosen is just too unstable on my machine. On my machine/OS (Linux 2.4), user and real time are usually the same for ocaml, but can differ somewhat for C++ (probably because malloc/free is done by the kernel or something, I wouldn't know). Had I used user time, it would have steered the results in favor of C++ a little more in some cases. [...] > Not on my machine / with my compiler. Btw., not very fair of you to > compare ephemeral and persistent datastructures... ;-) I'm not! Both tree_mutable_ml.ml and tree_cpp.cpp contain mutable binary trees. I think your C++ tree is slower than mine because of the old compiler (Or maybe it's the OS: tree allocates a lot of small objects). [...] > Look at the assembler output for details... ;-) IANAAP (I am not an assembly programmer :) Cheers, Oleg P.S. It looks like List and Array iteration is somehow much faster on Athlon than P3 Xeon. ------------------- 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