caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michel Schinz <Michel.Schinz@epfl.ch>
To: caml-list@inria.fr
Subject: Re: Performance of threaded interpreter on hyper-threaded CPU
Date: Tue, 18 Apr 2006 13:59:55 +0200	[thread overview]
Message-ID: <m2odyzt7pg.fsf@torre.local> (raw)
In-Reply-To: <9d3ec8300604180440s74c5c908pe2c9f6f8d344bab7@mail.gmail.com>

"Till Varoquaux" <till.varoquaux@gmail.com> writes:

[...]

> Could you try running your multithreaded code on only one of the
> virtual cpu to see the improvement hyperthreading really brings in?

To clarify things: I'm not talking about a multi-threaded program.

"Threaded code" is a technique which is commonly used to speed up
dispatching in interpreters. It is relatively well described on the
following page:

http://www.complang.tuwien.ac.at/forth/threaded-code.html

The OCaml VM is written in such a way that it uses that technique if
possible (basically if it is compiled using a recent gcc, which offers
the extensions needed to implement threaded code), and falls back to a
"standard" switch-based dispatching technique otherwise.

My observation is that in some circumstances, threaded code seems to
slow down the VM instead of speeding it up as it should. (The biggest
slowdown being observed on a hyper-threaded architecture, but I have
no idea why).

Michel.


  reply	other threads:[~2006-04-18 12:00 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 [this message]
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     ` [Caml-list] " Joaquin Cuenca Abela
2006-04-27 11:42       ` 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=m2odyzt7pg.fsf@torre.local \
    --to=michel.schinz@epfl.ch \
    --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).