caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: John Carr <jfc@MIT.EDU>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: OCaml List <caml-list@inria.fr>
Subject: Re: [Caml-list] register windows
Date: Tue, 20 May 2003 17:26:28 -0400	[thread overview]
Message-ID: <200305202126.RAA03623@no-knife.mit.edu> (raw)
In-Reply-To: Your message of "Tue, 20 May 2003 21:48:54 +0200." <20030520214854.A31426@pauillac.inria.fr>


> A fixed-size register window is always going to save and restore too
> many registers.

As long as you stay within the eight windows implemented in hardware
saving the extra registers costs nothing -- a save instruction takes
one cycle.

Register windows were invented when somebody observed that programs
tended to stay within a small range of call depth.  That observation
is about 25 years old.  Since then inlining has reduced call depth
while the rise of giant libraries with layers and layers of wrapper
functions has increased call depth.

The question is, are present-day ocaml programs typically the sort for
which register windows are better?

> IIRC, there was one test where register windows were slightly faster;
> on most tests, they were somewhat slower; and on a few tests involving
> deep recursion, the code using register windows was 10-50 times slower
> than the code that didn't use them.

UltraSPARC should improve the speed ratio of the last class by a
factor of a few compared to older SPARC and may also help windowed
programs with shallow call depths.

I plan to try changing to code generator to use windows and do some
tests, but I won't get around to that any time soon.

-------------------
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


  reply	other threads:[~2003-05-20 21:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-16  8:24 [Caml-list] POSIX Threads: kill Christoph Bauer
2003-05-16  9:54 ` Xavier Leroy
2003-05-17 13:21   ` John Carr
2003-05-20 19:48     ` [Caml-list] register windows Xavier Leroy
2003-05-20 21:26       ` John Carr [this message]
2003-05-24  9:56         ` Xavier Leroy
2003-06-02 21:00     ` [Caml-list] POSIX Threads: kill John Max Skaller

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=200305202126.RAA03623@no-knife.mit.edu \
    --to=jfc@mit.edu \
    --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).