Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: David Monniaux <David.Monniaux@ens.fr>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: Liste CAML <caml-list@inria.fr>
Subject: Re: [Caml-list] optimizing functors
Date: Mon, 4 Feb 2002 13:50:06 +0100 (MET)	[thread overview]
Message-ID: <Pine.GSO.4.03.10202041337360.28015-100000@basilic.ens.fr> (raw)
In-Reply-To: <20020202185918.B3976@pauillac.inria.fr>

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


  reply	other threads:[~2002-02-04 12:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-31  6:49 David Monniaux
2002-02-02 17:59 ` Xavier Leroy
2002-02-04 12:50   ` David Monniaux [this message]
2002-02-05  8:11     ` Francois Pottier
2002-02-04 14:12 Michael Hicks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.03.10202041337360.28015-100000@basilic.ens.fr \
    --to=david.monniaux@ens.fr \
    --cc=caml-list@inria.fr \
    --cc=xavier.leroy@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox