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] yet another benchmark: vs tail recursive map
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alexander V. Voinov <avv@q...>
Subject: Re: [Caml-list] Re: yet another benchmark: vs tail recursive map
Hi Stefano,

Stefano Zacchiroli wrote:

>On Wed, Jun 04, 2003 at 05:13:27PM +0200, Christophe TROESTLER wrote:
>>Given this, it rather seems that is fine -- for if one really
>>wants speed, one will compile to native code and the bytecode version
>My point is not having speed, but rather having tail recursion. In many
>cases lists are the correct data structure even for "a lot of elements".
>I've always thought that tail recursive version of map would have been
>terribly slower than not tail recrusive one due to the additional
A year ago I 'benchmarked' almost exactly the alternatives you discuss 
within some real application. The difference was substantial, and I had 
to work with 'lots of elements'. List.rev took significant time, you 
can't neglect this. I even thought about implementing as a C 
extension which calls the first argument as a callback and use pointer 
operations to build the list without consuming the stack. Not sure if 
it's a _proper-way-to-go_ :-).


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