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 OAA16809; Mon, 10 Jun 2002 14:50:15 +0200 (MET DST) 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 OAA16821 for ; Mon, 10 Jun 2002 14:50:14 +0200 (MET DST) Received: from iona.labri.fr (iona.labri.fr [147.210.8.143]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g5ACoDb13681 for ; Mon, 10 Jun 2002 14:50:13 +0200 (MET DST) Received: from localhost (localhost.localdomain [127.0.0.1]) by iona.labri.fr (Postfix) with ESMTP id 140F77E72 for ; Mon, 10 Jun 2002 14:50:13 +0200 (CEST) Received: from serveur3.labri.fr (serveur3.labri.fr [147.210.8.180]) by iona.labri.fr (Postfix) with ESMTP id 22E727E34 for ; Mon, 10 Jun 2002 14:50:12 +0200 (CEST) Received: (from vanicat@localhost) by serveur3.labri.fr (8.11.6/8.11.6) id g5ACoCx26143; Mon, 10 Jun 2002 14:50:12 +0200 X-Authentication-Warning: serveur3.labri.fr: vanicat set sender to vanicat@labri.u-bordeaux.fr using -f To: caml-list@inria.fr Subject: Re: [Caml-list] Timing Ocaml References: <4.3.2.7.2.20020609232056.029ec260@mail.d6.com> From: Remi VANICAT In-Reply-To: Date: 10 Jun 2002 14:50:11 +0200 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Dmitry Bely writes: > Chris Hecker writes: > > >>* The GNU C compiler gcc is recommended, as the bytecode > >> interpreter takes advantage of gcc-specific features to enhance > >> performance. > >>What is the nature of these optimizations? > > > > GCC lets you take the address of a label. You can see in > > byterun/interp.c that it uses a jump table instead of a switch when > > you're using GCC. > > > > At least, that's what it looks like. > > I would rather say that gcc allows to force register allocation for some > specific variable, while MSVC always ignore "register" specifier. > > #if defined(__GNUC__) && !defined(DEBUG) > [...] > #ifdef __i386__ > #define PC_REG asm("%esi") > #define SP_REG asm("%edi") > #define ACCU_REG > #endif > [...] > #endif well, it seem that threaded code also depend of being compile with gcc: #if defined(__GNUC__) && __GNUC__ >= 2 && !defined(DEBUG) && !defined (SHRINKED_ GNUC) #define THREADED_CODE #endif so both register assignation and threaded code can imply a lot of speedup. -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- 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