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 XAA00709; Tue, 20 May 2003 23:26:32 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA01845 for ; Tue, 20 May 2003 23:26:31 +0200 (MET DST) Received: from fort-point-station.mit.edu (FORT-POINT-STATION.MIT.EDU [18.7.7.76]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h4KLQUT01706; Tue, 20 May 2003 23:26:30 +0200 (MET DST) Received: from central-city-carrier-station.mit.edu (CENTRAL-CITY-CARRIER-STATION.MIT.EDU [18.7.7.72]) by fort-point-station.mit.edu (8.12.4/8.9.2) with ESMTP id h4KLQTPG019426; Tue, 20 May 2003 17:26:29 -0400 (EDT) Received: from manawatu-mail-centre.mit.edu (MANAWATU-MAIL-CENTRE.MIT.EDU [18.7.7.71]) by central-city-carrier-station.mit.edu (8.12.4/8.9.2) with ESMTP id h4KLQSb5021370; Tue, 20 May 2003 17:26:28 -0400 (EDT) Received: from no-knife.mit.edu (NO-KNIFE.MIT.EDU [18.7.16.64]) ) by manawatu-mail-centre.mit.edu (8.12.4/8.12.4) with ESMTP id h4KLQSFJ013127; Tue, 20 May 2003 17:26:28 -0400 (EDT) Received: (from jfc@localhost) by no-knife.mit.edu (8.9.3p2) id RAA03623; Tue, 20 May 2003 17:26:28 -0400 (EDT) Message-Id: <200305202126.RAA03623@no-knife.mit.edu> To: Xavier Leroy cc: OCaml List Subject: Re: [Caml-list] register windows In-Reply-To: Your message of "Tue, 20 May 2003 21:48:54 +0200." <20030520214854.A31426@pauillac.inria.fr> Date: Tue, 20 May 2003 17:26:28 -0400 From: John Carr X-Spam: no; 0.00; jfc:01 caml-list:01 implemented:01 inlining:01 slower:01 recursion:01 ultrasparc:01 ocaml:01 shallow:02 observation:03 slightly:03 carr:05 functions:05 somewhat:06 giant:93 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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