Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml troll on Slashdot
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Brown <caml-list2@d...>
Subject: Re: [Caml-list] tail-recursion vs. no tail-recursion in list functions
On Thu, Mar 17, 2005 at 10:41:13PM +0100, Oliver Bandel wrote:

> IMHO this does not makes sense.
> Better checking listlength with List.length and then calling the
> needed function directly.
> Why using an integer counter... this introduces overhead.

List.length is O(n) and will be at least as much overhead as a counter kept
for the beginning portion of the list.

Dave