From: Xavier Leroy <xavier.leroy@inria.fr>
To: Dmitry Bely <dbely@mail.ru>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Timing Ocaml
Date: Tue, 11 Jun 2002 11:08:36 +0200 [thread overview]
Message-ID: <20020611110836.A3628@pauillac.inria.fr> (raw)
In-Reply-To: <zny2qkwe.fsf@mail.ru>; from dbely@mail.ru on Tue, Jun 11, 2002 at 12:28:33PM +0400
> I see... But there is another solution: use C switch() operator in interp
> main loop that is translated to jump table by MSVC optimizer (don't know if
> gcc is capable to do this).
Dmitry, don't be naive: of course the bytecode interpretor loop uses
switch() if computed gotos are not available, and of course any C
compiler translates this switch() to a jump table. But the jumptable
is still significantly slower than the computed goto trick, since it
involves one extra compare-and-branch and one extra memory load.
This discussion ("efficient bytecode interpreters") is getting
off-topic for caml-list, so please let's stop here. If you're still
curious, the best way to understand the issues at hand is to stare at
the assembly code generated for interp.c :-)
- Xavier Leroy
-------------------
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
next prev parent reply other threads:[~2002-06-11 9:08 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 [this message]
2002-06-11 12:52 ` Mattias Waldau
2002-06-10 18:19 ` Blair Zajac
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=20020611110836.A3628@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=dbely@mail.ru \
/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