Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] O'Caml vs C++: a little benchmark
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-19 (21:17)
From: malc <malc@p...>
Subject: Re: [Caml-list] Inlining across functors (was: O'Caml vs C++: a little benchmark)
On Mon, 19 Aug 2002, Thorsten Ohl wrote:

> Xavier Leroy <> writes:
> > Just for the record: ocamlopt does perform inlining across
> > compilation units (via the information stored in .cmx files).  What
> > it doesn't do, however, is inlining and specialization of recursive
> > function definitions.
> However, it appears that it doesn't inline across functors.  For
> example, in
> Is this because the signature M can make no guarantee that op is never
> a recursive function? Do all functor applications fall under the `no
> inlining and specialization of recursive function definitions' clause?

Yes. With 
(patch against 3.04) you will get this instead:

*** Linearized code                                                             
  A/11[%ecx] := [env/10[%ecx] + 12]                                             
  A/12[%ecx] := [A/11[%ecx]]                                                    
  tailcall "Opt_f_62" R/0[%eax]                                                 


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: