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 NAA02143; Mon, 4 Feb 2002 13:50:13 +0100 (MET) 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 NAA03148 for ; Mon, 4 Feb 2002 13:50:12 +0100 (MET) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g14CoBX16260; Mon, 4 Feb 2002 13:50:11 +0100 (MET) Received: from dmi.ens.fr (dmi.ens.fr [129.199.96.11]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g14Co7p28103 ; Mon, 4 Feb 2002 13:50:07 +0100 (CET) Received: from basilic.ens.fr (monniaux@basilic [129.199.99.48]) by dmi.ens.fr (8.10.1/jb-1.3-180200) id g14Co7p17654 ; Mon, 4 Feb 2002 13:50:07 +0100 (MET) Received: from localhost (monniaux@localhost) by basilic.ens.fr (8.11.0/jb-1.1) id g14Co6I28244 ; Mon, 4 Feb 2002 13:50:06 +0100 (MET) X-Authentication-Warning: basilic.ens.fr: monniaux owned process doing -bs Date: Mon, 4 Feb 2002 13:50:06 +0100 (MET) From: David Monniaux X-Sender: monniaux@basilic.ens.fr To: Xavier Leroy cc: Liste CAML Subject: Re: [Caml-list] optimizing functors In-Reply-To: <20020202185918.B3976@pauillac.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 2 Feb 2002, Xavier Leroy wrote: > Yes, but not across functor applications. More precisely, functions > that are passed through a functor parameter cannot be inlined nor > called with the optimized "direct" application scheme, they always go > through the generic "indirect-through-closure" application scheme. I realize that the current scheme of implementing modules as records is (relatively) simple and allows easy separate compilation. However, it prevents optimizations, as you said. In code containing many modules consisting of a few small functions called by functions in functors, this lack of optimization may be costly. I was thinking of implementing such functors similarly as C++ templates (expanding the functor parameters). Has some work been done on this? David Monniaux http://www.di.ens.fr/~monniaux Laboratoire d'informatique de l'École Normale Supérieure, Paris, France ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr