Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Oleg <oleg_inconnu@m...>
Subject: inlining tail-recursive functions (Re: [Caml-list] O'Caml vs C++: a little benchmark)
On Wednesday 28 August 2002 09:47 am, John Max Skaller wrote:
> > BTW does O'Caml inline tail-recursive functions?
>
> Do you mean loop unrolling? I hear that it doesn't
> do loop unrolling. [There's nothing to gain from
> a simple inlining, unless the loop is only executed
> once or twice - you'd only save a single function call]

It's been mentioned that O'Caml can inline functions that are not recursive 
(including inlining across module boundaries). Tail-recursive functions can 
be, basically, transformed into non-recursive functions by the compiler. So I 
was wondering if O'Caml inlined them. The benefits of inlining tail-recursive 
functions should thus be the same as the benefits of inlining non-recursive 
functions.

Cheers
Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners