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 DAA08429; Wed, 19 Mar 2003 03:39:15 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA07891 for ; Wed, 19 Mar 2003 03:39:14 +0100 (MET) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h2J2dDf15289 for ; Wed, 19 Mar 2003 03:39:13 +0100 (MET) Received: (qmail 41584 invoked from network); 19 Mar 2003 02:39:11 -0000 Received: from arda.pair.com (HELO compaqreview.d6.com) (209.68.1.133) by relay.pair.com with SMTP; 19 Mar 2003 02:39:11 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20030318182012.03a87480@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 18 Mar 2003 18:34:29 -0800 To: caml-list@inria.fr From: Chris Hecker Subject: [Caml-list] ocamlopt speed (was Re: Module recursion) In-Reply-To: <4.3.2.7.2.20030317110310.0451dfa0@localhost> References: <4.3.2.7.2.20030316205959.045990d8@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam: no; 0.00; hecker:01 checker:01 ocamlopt:01 recursion:01 troestler:01 slower:01 camlp:01 timings:01 compiler:01 chris:01 christophe:01 caml:01 bytecode:01 msvc:01 makefile:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Christophe Troestler contacted me off list to ask about this comment from one of my mails: >especially since the native compiler is a bit pokey (6x slower than a C++ >compiler for same LOC last time I checked) Christophe asked if I was using ocamlopt.opt or ocamlopt. I said I thought I was using the latter but that I'd check and post back to the list. It turns out I was using ocamlopt (the bytecode build of the native code compiler). I had built the .opt versions but not switched over to them (I was using camlp4o.opt where I was using camlp4, though). I switched and it got almost twice as fast, which is very nice. I also retimed the C project that I was informally comparing to, and the timings on this machine (laptop with very fast cpu, very slow hard drive) are quite different than the other machine I originally tested on (desktop with slow cpu, fast hard drive, or I made a mistake on that machine, which is more than possible). I will retime things there as well when I go to the office. Here are the results on this machine, which shows ocamlopt.opt just about matching msvc6. This isn't trying to be a formal test, so I don't account for things like the difference in code complexity (they're both games), system headers included in C files (which would favor C if they were cleaned up) or the fact that my makefile for caml doesn't pass multiple ml files to the compiler (which should favor ocamlopt), etc. compiler sec loc loc/sec ------------ --- ----- ------- msvc6 12 27865 2322 ocamlopt 13 15483 1191 ocamlopt.opt 7 15483 2211 Chris ------------------- 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