From: Xavier Leroy <email@example.com>
Subject: Re: ocaml inlining
In-Reply-To: <199703251536.KAA12012@gulag.cs.cornell.edu> from Mark Hayden at "Mar 25, 97 10:36:15 am"
To: firstname.lastname@example.org (Mark Hayden)
Date: Wed, 26 Mar 1997 11:20:34 +0100 (MET)
> In the recent versions of Ocaml, are functions inlined
> across modules? Across files?
Yes to both. (Remember: this applies only to the native-code compiler.)
The body of an inlinable function is stored in the .cmx file for its
defining module, thus it can be inlined from other modules.
> If so, what is the effect of
> compiling several files with different levels of inlining?
The inlining level (-inline n) is taken into account when compiling a
function definition, but not when compiling a call to this function.
If the function is small enough (w.r.t. the inlining level at that
time), it is marked inlinable, and all uses of this function will
inline its body, regardless of the value of -inline at the time of use.
- Xavier Leroy
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:10 MET