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 VAA21120; Wed, 7 Jul 2004 21:16:26 +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 VAA20986 for ; Wed, 7 Jul 2004 21:16:25 +0200 (MET DST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i67JGMSH027864; Wed, 7 Jul 2004 21:16:23 +0200 Received: from [192.168.1.200] (ppp214-48.lns1.syd2.internode.on.net [203.122.214.48]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i67JGJHY002563; Thu, 8 Jul 2004 04:46:20 +0930 (CST) Subject: Re: [Caml-list] Does Caml have slow arithmetics ? From: skaller Reply-To: skaller@users.sourceforge.net To: Xavier Leroy Cc: caml-list In-Reply-To: <20040707145803.GB27498@yquem.inria.fr> References: <20040707091308.GA26172@bourg.inria.fr> <20040707145803.GB27498@yquem.inria.fr> Content-Type: text/plain Message-Id: <1089227778.29648.81.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 08 Jul 2004 05:16:19 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40EC4C06.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 sourceforge:01 2004:99 tail-rec:01 optimised:01 optimised:01 idioms:01 optimise:01 9660:01 glebe:01 caml:01 closure:01 nsw:01 snail:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 2004-07-08 at 00:58, Xavier Leroy wrote: > On the other hand, reducing inefficiencies already present in the > source code isn't a priority. Of course that argument fails totally in one important case -- Q: if you wanted a loop why didn't you use one? A: tail-rec functional code is considered cute :) I'm sure there are other cases .. would not: let x = 1 in let y = 1 in let z = 1 in ... be optimised into a single closure, not 3? Or do i really have to write: let x = 1 and y = 1 and z = 1 in .. What's efficient depends on what's optimised which depends on what idioms are considered 'cute' looking :) BTW: there is another answer to the question Xavier asked: Q: why did you write the code that way ..? A: I didn't, it was generated.. which suggests sometimes there is a reason to optimise 'silly' looking code. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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