Browse thread
Tail Recursion on Map, Append, etc.
-
Tyson Whitehead
- Richard Jones
-
Jacques Garrigue
- Christophe Raffalli
[
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: | Christophe Raffalli <Christophe.Raffalli@u...> |
| Subject: | Re: [Caml-list] Tail Recursion on Map, Append, etc. |
A small remark: on map, the rev_map function composed with rev (which are purely function and tail-rec) may be often faster than a tail recursive version of map on large list, especially if each function call from map does some allocation, because the tail recursive version of map does assignments and this cost a lot for the GC ... I did some testing, and the timings where similar for both solution ... which is not what I expected. -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature. The public key is stored on www.keyserver.net ---------------------------------------------