From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
To: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
Cc: twhitehe@uwo.ca, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Tail Recursion on Map, Append, etc.
Date: Thu, 17 Mar 2005 10:24:44 +0100 [thread overview]
Message-ID: <42394CDC.60805@univ-savoie.fr> (raw)
In-Reply-To: <20050317.144040.107913221.garrigue@math.nagoya-u.ac.jp>
[-- Attachment #1: Type: text/plain, Size: 938 bytes --]
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
---------------------------------------------
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
prev parent reply other threads:[~2005-03-17 9:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-16 16:05 Tyson Whitehead
2005-03-16 17:06 ` [Caml-list] " Richard Jones
2005-03-17 5:40 ` Jacques Garrigue
2005-03-17 9:24 ` Christophe Raffalli [this message]
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=42394CDC.60805@univ-savoie.fr \
--to=christophe.raffalli@univ-savoie.fr \
--cc=caml-list@yquem.inria.fr \
--cc=garrigue@math.nagoya-u.ac.jp \
--cc=twhitehe@uwo.ca \
/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