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 OAA18964; Thu, 8 Jul 2004 14:03:16 +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 OAA18771 for ; Thu, 8 Jul 2004 14:03:15 +0200 (MET DST) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i68C3DSH013621 for ; Thu, 8 Jul 2004 14:03:13 +0200 Received: from qrnik ([192.168.0.1] ident=qrczak) by qrnik.knm.org.pl with esmtp (Exim 3.36 #1) id 1BiXcO-0001HP-00 for caml-list@inria.fr; Thu, 08 Jul 2004 14:03:13 +0200 Subject: Re: [Caml-list] Does Caml have slow arithmetics ? From: "Marcin 'Qrczak' Kowalczyk" To: caml-list In-Reply-To: <40ED190E.3080005@ps.uni-sb.de> 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> Content-Type: text/plain; charset=ISO-8859-2 Date: Thu, 08 Jul 2004 14:03:12 +0200 Message-Id: <1089288192.19759.38.camel@qrnik> Mime-Version: 1.0 X-Mailer: Evolution 1.5.9.2 Content-Transfer-Encoding: quoted-printable X-Miltered: at concorde with ID 40ED3801.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 arithmetics:01 marcin:01 'qrczak':01 kowalczyk:01 qrczak:01 rossberg:01 recursion:01 gcc:01 gcc:01 pointers:01 marcin:01 kowalczyk:01 qrczak:01 caml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk W li=B6cie z czw, 08-07-2004, godz. 11:51 +0200, Andreas Rossberg napisa=B3 (a): > First, you have to distinguish between simple tail *recursion*, and the=20 > much more general concept of tail *call*. I believe Scheme requires to=20 > fully optimize the latter, and so it is done by all decent FPL=20 > implementations. GCC does not do that, already falling short of mutually=20 > recursive functions, IIRC. GCC sometimes does optimize non-recursive tail calls too. > (once more due to pointers, particularly C allowing - and its libraries=20 > relying on - taking the address of local variables). Another problem is that with the default calling convention the caller pops the arguments, so it's impossible to optimize a tail call to a function which has more arguments than the caller. --=20 __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ ------------------- 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