caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Joaquin Cuenca Abela <e98cuenc@yahoo.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Performance of threaded interpreter on hyper-threaded CPU
Date: Tue, 25 Apr 2006 15:52:32 -0700 (PDT)	[thread overview]
Message-ID: <20060425225232.20309.qmail@web50414.mail.yahoo.com> (raw)
In-Reply-To: <m2slobtbzp.fsf@torre.local>

Michel wrote:

> I'm aware of the problem due to gcc's cross-jumping "optimisation"
> (described as you mention by Ertl in [1]). For the record, I tried
> disabling it with -fno-crossjumping, but as Ertl mention, this didn't
> change anything. However, judging by the versions of gcc I'm using,
> cross-jumping should also be performed on the second machine, for
> which threaded code provides a noticable gain...

Hi,

FWIW, I did some tests with gcc 3.4.2, and -fno-crossjumping works *sometimes*. If you combine it with -O2 *and* your virtual machine has less than 10 opcodes (??) then -fno-crossjumping works as expected.

Otherwise (ie, with any real virtual machine) gcc generates an extra jump, but you don't get exactly the same assembler than if you use a switched vm. The assembly for the switched vm pushes more instructions in the extra basic block than the assembly for the threaded vm.

In the threaded vm, the extra block is only (in my test) a jmp *%eax.

Cheers,

--
Joaquin Cuenca Abela



  parent reply	other threads:[~2006-04-25 22:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18  8:04 Michel Schinz
2006-04-18  8:33 ` [Caml-list] " Xavier Leroy
2006-04-18 10:27   ` Michel Schinz
2006-04-18 11:40     ` [Caml-list] " Till Varoquaux
2006-04-18 11:59       ` Michel Schinz
2006-04-18 12:56     ` Stefan Monnier
2006-04-18 16:18     ` [Caml-list] " Xavier Leroy
2006-04-18 16:42       ` gang chen
2006-04-19  8:24       ` Michel Schinz
2006-04-25 22:52     ` Joaquin Cuenca Abela [this message]
2006-04-27 11:42       ` [Caml-list] " Joaquin Cuenca Abela
2006-04-18  8:34 ` [Caml-list] " Christophe TROESTLER
2006-04-18  8:46   ` Jonathan Roewen
2006-04-18  8:57     ` Christophe TROESTLER

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=20060425225232.20309.qmail@web50414.mail.yahoo.com \
    --to=e98cuenc@yahoo.com \
    --cc=caml-list@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).