From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA31618; Tue, 20 May 2003 21:48:58 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA31609 for ; Tue, 20 May 2003 21:48:57 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h4KJmtH09604; Tue, 20 May 2003 21:48:55 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA31605; Tue, 20 May 2003 21:48:54 +0200 (MET DST) Date: Tue, 20 May 2003 21:48:54 +0200 From: Xavier Leroy To: John Carr Cc: OCaml List Subject: Re: [Caml-list] register windows Message-ID: <20030520214854.A31426@pauillac.inria.fr> References: <20030516115410.A8817@pauillac.inria.fr> <200305171321.JAA30974@psi-phi.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200305171321.JAA30974@psi-phi.mit.edu>; from jfc@MIT.EDU on Sat, May 17, 2003 at 09:21:52AM -0400 X-Spam: no; 0.00; caml-list:01 model:01 experimented:01 gallium:01 slower:01 recursion:01 conducted:99 compiler:01 ocaml:01 approaches:01 equation:01 overflow:02 native-code:02 stack:02 explicit:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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