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 XAA17141; Mon, 19 Aug 2002 23:17:08 +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 XAA17118 for ; Mon, 19 Aug 2002 23:17:08 +0200 (MET DST) Received: from comtv.ru (comtv.ru [217.10.32.4]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g7JLH7T22511 for ; Mon, 19 Aug 2002 23:17:07 +0200 (MET DST) Received: from [10.0.66.9] ([10.0.66.9] verified) by comtv.ru (CommuniGate Pro SMTP 3.5.9) with ESMTP-TLS id 4151970; Tue, 20 Aug 2002 01:17:06 +0400 Date: Tue, 20 Aug 2002 01:16:33 +0400 (MSD) From: malc X-X-Sender: malc@home.oyster.ru To: Thorsten Ohl cc: caml-list@inria.fr Subject: Re: [Caml-list] Inlining across functors (was: O'Caml vs C++: a little benchmark) In-Reply-To: <15712.63866.575444.515916@wptx47.physik.uni-wuerzburg.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 19 Aug 2002, Thorsten Ohl wrote: > Xavier Leroy writes: > > > Just for the record: ocamlopt does perform inlining across > > compilation units (via the information stored in .cmx files). What > > it doesn't do, however, is inlining and specialization of recursive > > function definitions. > > However, it appears that it doesn't inline across functors. For > example, in snip > > Is this because the signature M can make no guarantee that op is never > a recursive function? Do all functor applications fall under the `no > inlining and specialization of recursive function definitions' clause? Yes. With http://algol.prosalg.no/~malc/code/patches/specfun.tar.gz (patch against 3.04) you will get this instead: *** Linearized code Opt_f2_72: A/11[%ecx] := [env/10[%ecx] + 12] A/12[%ecx] := [A/11[%ecx]] tailcall "Opt_f_62" R/0[%eax] R/1[%ebx] R/2[%ecx] -- mailto:malc@pulsesoft.com ------------------- 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