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 RAA19925; Sat, 20 Jul 2002 17:14:05 +0200 (MET DST) 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 RAA19921 for ; Sat, 20 Jul 2002 17:14:04 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from ruthenium.btinternet.com (ruthenium.btinternet.com [194.73.73.138]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g6KFE3j11398 for ; Sat, 20 Jul 2002 17:14:03 +0200 (MET DST) Received: from host217-39-128-247.in-addr.btopenworld.com ([217.39.128.247] helo=beertje.william.bogus) by ruthenium.btinternet.com with esmtp (Exim 3.22 #8) id 17Vvvm-0002kp-00; Sat, 20 Jul 2002 16:14:03 +0100 Received: (from williamc@localhost) by beertje.william.bogus (8.11.6/8.11.6/SuSE Linux 0.5) id g6KFGKI25115; Sat, 20 Jul 2002 16:16:20 +0100 X-Authentication-Warning: beertje.william.bogus: williamc set sender to williamc@paneris.org using -f From: William Chesters MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15673.32452.130587.498649@beertje.william.bogus> Date: Sat, 20 Jul 2002 16:16:20 +0100 To: caml-list@inria.fr Subject: [Caml-list] Caml productivity. In-Reply-To: <20020715212251.19685.qmail@web13302.mail.yahoo.com> References: <20020715212251.19685.qmail@web13302.mail.yahoo.com> X-Mailer: VM 6.95 under 21.4 (patch 4) "Artificial Intelligence" XEmacs Lucid Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Pal-Kristian Engstad writes: > Some proponents of this mailing list seem to be > convinced that Ocaml is so much more productive than > C++. I find this to be a terrible mistake. From an > industry where performance is crucial (games > programming), I find quite a few aspects of Ocaml hard > to unify with productivity. You are saying that for some tasks the superior productivity of ocaml, in terms of development time, is irrelevant because you cannot achieve the required level of performance. I (myself, personally) thought your mail contained several misconceptions about ocaml. I work with C++ in HPC, and I've played with a variety of different languages and coding idioms; I have to say that ocaml is generally quite competitive with "general purpose" C and Fortran compilers, if you write your inner loops in a Fortran style. ocaml will lose in some cases against serious Fortran compilers that do heavyweight HPC optimisations, but as far as I know very few C++ compilers have that capability (Intel's?). And for some tasks the superior performance of Fortran is irrelevant because you cannot achieve the required level of productivity :-P. ocaml also loses performances as soon as you start trying to put nice abstraction features in the inner loops. This is disappointing but not specific to ocaml: templated inner loops in C++ are fast if they only use scalars, but loops involving e.g. lightweight objects as "iterators" are not, unless you are using the KAI compiler. (Which has just been bought up and killed off by Intel, grrr. KAI was way ahead of its time; it really made it possible to write incredibly "high level" C++ and get fast code out the back. I wish all that effort had been done in a university, put into a more sensible language, and liberated so that nobody could take it away :( .) I don't agree that the lack of operator overloading is a problem, per se. If you follow the argument (passim ad nauseam in the archives) you eventually reach the conclusion that the real problem is that the compiler doesn't inline across module boundaries---and that _is_ serious. If access to machine-specific instructions is a problem, then ocaml isn't the right tool. Of course, if your uses of them occur in library routines which can naturally be written in C, then you don't have a problem. In short, ocaml is really not so bad for high performance, provided that you take care to write your inner loops in a "dumb" way and save the nice language features for the rest of the code (and you have to do that anyway, although maybe not so stringently, with C++). ------------------- 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