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] Does Caml have slow arithmetics ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: Tail calls (Was Re: [Caml-list] Does Caml have slow arithmetics ?)
> Can you comment on the effect of -inline switch and inlining in general?
> If you have 
> let rec f a1 a2 a3 a4 ... = 
>   let g b1 b2 ... = f b2 b2 ... in
>   g a1 a2 ...
> we have situation where the tail call in g isn't to g
> but to its parent f .. however this is an obvious candidate
> for inlining, and if we inline g into the body of f,
> then the tail call is to f, which is itself, which might
> then be tail-call optimised .. yes?

Yes.  Tail-call elimination is performed after inlining.

- Xavier Leroy

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