From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id DA09CBC32 for ; Thu, 17 Mar 2005 10:25:06 +0100 (CET) Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j2H9P652014764 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 17 Mar 2005 10:25:06 +0100 Received: from [193.48.123.85] (d85.lama.univ-savoie.fr [193.48.123.85]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id j2H9Oea1006583 ; Thu, 17 Mar 2005 10:24:41 +0100 Message-ID: <42394CDC.60805@univ-savoie.fr> Date: Thu, 17 Mar 2005 10:24:44 +0100 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jacques Garrigue Cc: twhitehe@uwo.ca, caml-list@yquem.inria.fr Subject: Re: [Caml-list] Tail Recursion on Map, Append, etc. References: <200503161105.49726.twhitehe@uwo.ca> <20050317.144040.107913221.garrigue@math.nagoya-u.ac.jp> In-Reply-To: <20050317.144040.107913221.garrigue@math.nagoya-u.ac.jp> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4ECE32C0EB939AD162EA98A1" Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Miltered: at nez-perce with ID 42394CF2.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 caml-list:01 recursion:01 recursive:01 recursive:01 timings:01 chablais:01 73376:01 univ-savoie:01 lama:01 ...:98 X-Attachments: type="application/pgp-signature" name="signature.asc" name="signature.asc" X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4ECE32C0EB939AD162EA98A1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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 --------------------------------------------- --------------enig4ECE32C0EB939AD162EA98A1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCOUzcSQDyWB/+xBwRAnaRAJ4r1ZRgC9/KaMnyZXQm1ZC3Pj+WdwCZAd9b 43+CayYubUxvXV3kx53FBQ0= =2Vzn -----END PGP SIGNATURE----- --------------enig4ECE32C0EB939AD162EA98A1--