English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Tail Recursion on Map, Append, etc.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-03-16 (16:06)
From: Tyson Whitehead <twhitehe@u...>
Subject: Tail Recursion on Map, Append, etc.
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 


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
Version: GnuPG v1.4.0 (GNU/Linux)