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: 2004-07-08 (12:03)
From: Marcin 'Qrczak' Kowalczyk <qrczak@k...>
Subject: Re: [Caml-list] Does Caml have slow arithmetics ?
W li¶cie z czw, 08-07-2004, godz. 11:51 +0200, Andreas Rossberg napisa³

> First, you have to distinguish between simple tail *recursion*, and the 
> much more general concept of tail *call*. I believe Scheme requires to 
> fully optimize the latter, and so it is done by all decent FPL 
> implementations. GCC does not do that, already falling short of mutually 
> recursive functions, IIRC.

GCC sometimes does optimize non-recursive tail calls too.

> (once more due to pointers, particularly C allowing - and its libraries 
> relying on - taking the address of local variables).

Another problem is that with the default calling convention the caller
pops the arguments, so it's impossible to optimize a tail call to a
function which has more arguments than the caller.

   __("<         Marcin Kowalczyk

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