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 PAA04882; Mon, 4 Feb 2002 15:12:06 +0100 (MET) 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 PAA03754 for ; Mon, 4 Feb 2002 15:12:05 +0100 (MET) Received: from exchange.cs.cornell.edu (exchange.cs.cornell.edu [128.84.97.8]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g14EC4X18116; Mon, 4 Feb 2002 15:12:04 +0100 (MET) content-class: urn:content-classes:message Subject: RE: [Caml-list] optimizing functors MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Mon, 4 Feb 2002 09:12:03 -0500 Message-ID: <706871B20764CD449DB0E8E3D81C4D4301E90835@opus.cs.cornell.edu> X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Thread-Topic: [Caml-list] optimizing functors Thread-Index: AcGte10AFpZ7kzRjTqW5b4eL2ALnrQACiUYw From: "Michael Hicks" To: "David Monniaux" , "Xavier Leroy" Cc: "Liste CAML" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I believe that the MLton compiler, which is a whole-program compiler for = SML, does this sort of optimization. See = http://www.sourcelight.com/MLton/. Mike > -----Original Message----- > From: David Monniaux [mailto:David.Monniaux@ens.fr] > Sent: Monday, February 04, 2002 7:50 AM > To: Xavier Leroy > Cc: Liste CAML > Subject: Re: [Caml-list] optimizing functors >=20 >=20 > On Sat, 2 Feb 2002, Xavier Leroy wrote: >=20 > > 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=20 > always go > > through the generic "indirect-through-closure" application scheme. >=20 > I realize that the current scheme of implementing modules as=20 > records is > (relatively) simple and allows easy separate compilation. However, it > prevents optimizations, as you said. >=20 > In code containing many modules consisting of a few small=20 > functions called > by functions in functors, this lack of optimization may be costly. >=20 > I was thinking of implementing such functors similarly as C++=20 > templates > (expanding the functor parameters). Has some work been done on this? >=20 > =20 > David Monniaux http://www.di.ens.fr/~monniaux > Laboratoire d'informatique de l'=C9cole Normale Sup=E9rieure, > Paris, France >=20 >=20 > ------------------- > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:=20 http://caml.inria.fr/FAQ/ 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/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr