Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Timing Ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Remi VANICAT <vanicat@l...>
Subject: Re: [Caml-list] Timing Ocaml
Dmitry Bely <dbely@mail.ru> writes:

> Chris Hecker <checker@d6.com> 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