caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Blair Zajac <blair@orcaware.com>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: Caml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Timing Ocaml
Date: Mon, 10 Jun 2002 11:19:32 -0700	[thread overview]
Message-ID: <3D04EDB4.7B7FE95A@orcaware.com> (raw)
In-Reply-To: <20020610170138.B19329@pauillac.inria.fr>

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 <blair@orcaware.com>
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


  parent reply	other threads:[~2002-06-10 18:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-10  5:35 Blair Zajac
2002-06-10  6:24 ` Chris Hecker
2002-06-10 12:02   ` Dmitry Bely
2002-06-10 12:50     ` Remi VANICAT
2002-06-10 14:19       ` Lionel Fourquaux
2002-06-10 15:01 ` Xavier Leroy
2002-06-10 16:29   ` Dmitry Bely
2002-06-10 16:49     ` Lionel Fourquaux
2002-06-11  8:28       ` Dmitry Bely
2002-06-11  9:08         ` Xavier Leroy
2002-06-11 12:52         ` Mattias Waldau
2002-06-10 18:19   ` Blair Zajac [this message]
2002-06-11  9:23     ` Florian Hars

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D04EDB4.7B7FE95A@orcaware.com \
    --to=blair@orcaware.com \
    --cc=caml-list@inria.fr \
    --cc=xavier.leroy@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).