From: Xavier Leroy <xavier.leroy@inria.fr>
To: John Carr <jfc@MIT.EDU>
Cc: OCaml List <caml-list@inria.fr>
Subject: Re: [Caml-list] register windows
Date: Tue, 20 May 2003 21:48:54 +0200 [thread overview]
Message-ID: <20030520214854.A31426@pauillac.inria.fr> (raw)
In-Reply-To: <200305171321.JAA30974@psi-phi.mit.edu>; from jfc@MIT.EDU on Sat, May 17, 2003 at 09:21:52AM -0400
> On the other hand, ocaml does not use register windows on SPARC and
> fixing that would be a big change. Did somebody determine that the
> "flat" model was faster, or was it just easier to implement?
I experimented both approaches (with and without register windows) on
the SPARC a long time ago, in the Gallium experimental compiler
(which, after a complete rewrite, became the OCaml native-code compiler).
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. I believe the Chez Scheme people
conducted similar experiments, with the same conclusions.
> SPARC v9 may change the equation because it was designed to make
> save and restore instructions fast, reducing window overflow traps
> to under 50 cycles.
A fixed-size register window is always going to save and restore too
many registers. Even with variable-sized windows like on the IA64,
I believe it's more efficient to schedule explicit spills and reloads in
between regular instructions than rely on the hardware and OS to move
window contents to and from the stack.
- 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:[~2003-05-20 19:48 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 ` Xavier Leroy [this message]
2003-05-20 21:26 ` [Caml-list] register windows John Carr
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=20030520214854.A31426@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=jfc@MIT.EDU \
/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