From: David Monniaux <David.Monniaux@ens.fr>
To: Liste CAML <caml-list@inria.fr>
Subject: [Caml-list] optimizing functors
Date: Thu, 31 Jan 2002 07:49:45 +0100 (MET) [thread overview]
Message-ID: <Pine.GSO.4.03.10201310738521.15113-100000@basilic.ens.fr> (raw)
We are currently writing code containing lots of stacked functors. Most of
the implemented functions are simple manipulations (two lines) that invoke
functions in the functor's argument module.
OCaml does inlining of functions in the same module. Does it also do it
between different modules? Would it optimize the following:
module M=
struct
let f = function 0 -> true | _ -> false
end
module N (D : sig val f: int->bool end) =
struct
let f = D.f
end
module P=N(M)
Does the compiler optimize the call to f in P, resolving it directly to
M.f, or does it do multiple indirections?
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
next reply other threads:[~2002-01-31 6:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-31 6:49 David Monniaux [this message]
2002-02-02 17:59 ` Xavier Leroy
2002-02-04 12:50 ` David Monniaux
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.10201310738521.15113-100000@basilic.ens.fr \
--to=david.monniaux@ens.fr \
--cc=caml-list@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