Browse thread
OCaml troll on Slashdot
-
Karl Zilles
-
Oliver Bandel
-
Michael Vanier
-
Jon Harrop
-
Yoann Padioleau
- Jon Harrop
- Paul Argentoff
- Paul Argentoff
-
Yoann Padioleau
-
Jon Harrop
- Yoann Padioleau
-
Michael Vanier
- Richard Jones
-
Oliver Bandel
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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