Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] optimizing functors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Monniaux <David.Monniaux@e...>
Subject: Re: [Caml-list] optimizing functors
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