Browse thread
tip for tail recursive map
[
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: | 2009-11-03 (01:29) |
From: | Yaron Minsky <yminsky@g...> |
Subject: | Re: [Caml-list] tip for tail recursive map |
I put a post on our blog a little while back discussing this. http://ocaml.janestreet.com/?q=node/71 There are a number of tricks you can do, including loop unrolling, and using a counter to keep track of the number of stack frames, to get code that behaves well on small-to-medium lists, uses a bounded number of stack frames, and is faster than the standard List.map even for small lists. y