Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] POSIX Threads: kill
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Carr <jfc@M...>
Subject: Re: [Caml-list] register windows

> 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