Browse thread
RE: [Caml-list] optimizing functors
- Michael Hicks
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michael Hicks <mhicks@c...> |
| Subject: | RE: [Caml-list] optimizing functors |
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 > > > 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 ------------------- 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