From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA27580; Thu, 8 Jul 2004 17:10:38 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA27489 for ; Thu, 8 Jul 2004 17:10:37 +0200 (MET DST) Received: from alex.baretta.com ([213.255.109.130]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i68FAaSH005900 for ; Thu, 8 Jul 2004 17:10:36 +0200 Received: from baretta.com (localhost [127.0.0.1]) by alex.baretta.com (Postfix) with ESMTP id 8E93F2D5ADA for ; Thu, 8 Jul 2004 11:11:32 -0400 (EDT) Message-ID: <40ED6424.7090903@baretta.com> Date: Thu, 08 Jul 2004 17:11:32 +0200 From: Alex Baretta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: it, en-us, en MIME-Version: 1.0 To: ocaml Subject: Re: [Caml-list] Does Caml have slow arithmetics ? References: <20040707091308.GA26172@bourg.inria.fr> <20040707145803.GB27498@yquem.inria.fr> <1089227778.29648.81.camel@pelican.wigram> <20040708034455.GB29942@davidb.org> <40ED190E.3080005@ps.uni-sb.de> <20040708140408.GA2386@davidb.org> <20040708163653.A1260@beaune.inria.fr> In-Reply-To: <20040708163653.A1260@beaune.inria.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40ED63EC.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; baretta:01 baretta:01 caml-list:01 arithmetics:01 2004:99 rossberg:01 tail-call:01 ocamlc:01 ocamlopt:01 tail-call:01 ocaml:01 caml:01 caml:01 alex:01 alex:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Luc Maranget wrote: >>On Thu, Jul 08, 2004 at 11:51:10AM +0200, Andreas Rossberg wrote: >> >>Many ocaml programs depend on tail-call elimination, although I don't >>believe anything in the docs requires it to be done. >> > > > Well, when programming in caml, I use the following rules (which I hope to be > accurate!) > > + ocamlc does perform tail call elimation > + ocamlopt does it less often. Namely, calls in tail position > become real tail calls when all their arguments are passed in registers. > (This does not apply to self-tail calls which are always optimized) > What?! Is this true? This effectively means that I cannot count on tail-call elimination in general? Alex ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners