Browse thread
Tail Recursion on Map, Append, etc.
- Tyson Whitehead
[
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: | Tyson Whitehead <twhitehe@u...> |
| Subject: | Tail Recursion on Map, Append, etc. |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I was wondering about the status of map and friends with regard to tail recursion. There was a big discussion back in 2003 about specific solutions (implementation of the those functions using Obj) and more general compiler support for holes/destination passing. It started with the following message: http://caml.inria.fr/pub/ml-archives/caml-list/2003/01/4a9754e53ff07723caf21b4496d1d267.en.html It sounded to me like the general consensus was to immediately implement the specific tail recursive versions of these functions for List and friends (which were provided in the discusion), and then improve the compiler by adding support for advanced hole/destination passing solutions. Looking at the list implementation in the OCaml Debian unstable source, it doesn't look like the more efficient version has been implemented. Further, looking at the assembler emitted for the code it doesn't look like the compiler supports holes/destination passing either. January 2003 was quite a while ago, anybody know what's up here? Thanks! -T - -- Tyson Whitehead (-twhitehe at uwo.ca -- WSC-) Computer Engineer Dept. of Applied Mathematics, Graduate Student- Applied Mathematics University of Western Ontario, GnuPG Key ID# 0x8A2AB5D8 London, Ontario, Canada -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCOFldRXbLmIoqtdgRArjXAKDX1ntabSketcJX37uy/GnjMBXclACgnl7i D2JY8tHbtwrY6/HtErXpy5c= =X6rG -----END PGP SIGNATURE-----