caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Tyson Whitehead <twhitehe@uwo.ca>
To: caml-list@yquem.inria.fr
Subject: Tail Recursion on Map, Append, etc.
Date: Wed, 16 Mar 2005 11:05:45 -0500	[thread overview]
Message-ID: <200503161105.49726.twhitehe@uwo.ca> (raw)

-----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-----


             reply	other threads:[~2005-03-16 16:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-16 16:05 Tyson Whitehead [this message]
2005-03-16 17:06 ` [Caml-list] " Richard Jones
2005-03-17  5:40 ` Jacques Garrigue
2005-03-17  9:24   ` Christophe Raffalli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200503161105.49726.twhitehe@uwo.ca \
    --to=twhitehe@uwo.ca \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).