From: Thorsten Ohl <ohl@hep.tu-darmstadt.de>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: William Chesters <williamc@dai.ed.ac.uk>, caml-list@inria.fr
Subject: Re: Functors ...
Date: Tue, 23 Jun 1998 19:00:26 +0200 [thread overview]
Message-ID: <199806231700.TAA14797@heplix.ikp.physik.tu-darmstadt.de> (raw)
In-Reply-To: <19980623120340.24172@pauillac.inria.fr>
Xavier Leroy <Xavier.Leroy@inria.fr> writes:
> In principle, the module language is terminating, so the compiler
> could simply generate a copy of the functor body at each functor
> application point, and work from here. This would allow more
> direct calls and inline expansion -- as much as if you'd written
> your code without functors -- but results in loss of separate
> compilation (the functor body is recompiled over and over again)
> and code bloat. C++ templates have precisely those two problems.
What about a compiler option (or directive) for selective functor
expansion? This way one can use the profiler (or static information
about the program) to fight code bloat by expanding just the functor
applications in the compilation units that appear to produce the most
frequently executed code?
I agree that it is not a very elegant solution. But why not, as long
as it helps to fight the misconception that functional programming is
slow?
Cheers,
-Thorsten
--
Thorsten Ohl, Physics Department, TU Darmstadt -- ohl@hep.tu-darmstadt.de
http://crunch.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]
prev parent reply other threads:[~1998-06-25 23:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-15 18:07 Functors William Chesters
1998-06-23 10:03 ` Functors Xavier Leroy
1998-06-23 17:00 ` Thorsten Ohl [this message]
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=199806231700.TAA14797@heplix.ikp.physik.tu-darmstadt.de \
--to=ohl@hep.tu-darmstadt.de \
--cc=Xavier.Leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=williamc@dai.ed.ac.uk \
/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