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 UAA25216; Mon, 10 Jun 2002 20:19:38 +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 UAA25224 for ; Mon, 10 Jun 2002 20:19:37 +0200 (MET DST) Received: from orcaware.com (bdsl.66.12.233.174.gte.net [66.12.233.174]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g5AIJY911251; Mon, 10 Jun 2002 20:19:35 +0200 (MET DST) Received: from orcaware.com (localhost.localdomain [127.0.0.1]) by orcaware.com (8.12.2/8.12.2) with ESMTP id g5AIJW60020186; Mon, 10 Jun 2002 11:19:33 -0700 Message-ID: <3D04EDB4.7B7FE95A@orcaware.com> Date: Mon, 10 Jun 2002 11:19:32 -0700 From: Blair Zajac X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,x-ns1rfacHe4WNh5,x-ns2U100btwUq5f MIME-Version: 1.0 To: Xavier Leroy CC: Caml Mailing List Subject: Re: [Caml-list] Timing Ocaml References: <3D043AB6.510307D0@orcaware.com> <20020610170138.B19329@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Xavier Leroy wrote: > > > Reading that the bytecode interpreter for Ocaml runs 2/3 as fast > > when compiled with VC 6 compared to gcc, has anybody done any > > timing comparisons with VisualStudio.Net, Intel C++ 5.x or > > Intel C++ 6.0? > > As others mentioned, the reason why gcc does a better job on the Caml > bytecode interpreter is not that gcc generates better code all by > itself (it doesn't), but that it supports "computed gotos" as a C > language extension. The bytecode interpreter takes advantage of this > feature by replacing opcodes with the addresses of the code fragments that > execute them, saving a significant amount of time in the bytecode > interpretation loop. > > Microsoft's C compilers don't support this extension, and I doubt > Intel's compilers do, at least under Windows. (Although I seem to > remember that Intel's compiler for Linux implements gcc extensions.) > > Someone else mentioned the explicit register declarations in the > bytecode interpreter. This is another gcc-specific extension, but > actually the bytecode interpreter uses them to work around the poor > register allocation performed by gcc (it fails to guess correctly > which local variables of the bytecode interpreter are most critical > and should end up in registers). So, it's really a gcc feature used > to work around a gcc deficiency :-) Other C compilers might actually > get the registers right by themselves. Thanks for the info. And do you recommend a particular program or set of programs to run to get a general relative performance number for each compiler, or does it really matter? Blair -- Blair Zajac Web and OS performance plots - http://www.orcaware.com/orca/ ------------------- 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