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 VAA31022; Sat, 14 Jul 2001 21:02:31 +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 VAA31019 for ; Sat, 14 Jul 2001 21:02:30 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f6EJ2Sf17869; Sat, 14 Jul 2001 21:02:28 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id VAA02328; Sat, 14 Jul 2001 21:02:28 +0200 Date: Sat, 14 Jul 2001 21:02:28 +0200 From: Daniel de Rauglaudre To: "Alexander V. Voinov" Cc: "caml-list@inria.fr" Subject: Re: [Caml-list] Generation of streams is slow Message-ID: <20010714210228.B2256@verdot.inria.fr> References: <3B4F70D7.82E58A91@quasar.ipa.nw.ru> <20010714042701.A24266@verdot.inria.fr> <3B4FB39D.10D1F6D5@quasar.ipa.nw.ru> <20010714060417.A25766@verdot.inria.fr> <3B4FC748.F9E14008@quasar.ipa.nw.ru> <3B4FCD2B.FC68C181@quasar.ipa.nw.ru> <20010714103426.B26003@verdot.inria.fr> <3B508A89.82717B26@quasar.ipa.nw.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0us In-Reply-To: <3B508A89.82717B26@quasar.ipa.nw.ru>; from avv@quasar.ipa.nw.ru on Sat, Jul 14, 2001 at 11:08:09AM -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Sat, Jul 14, 2001 at 11:08:09AM -0700, Alexander V. Voinov wrote: > h::(make_tail arg1 argN), > that is > CALL make_tail > CONS > and change them to > PREPARE_CONS > CALL make_tail > the scope of tail recursion optimization would increase. But it's > unlikely that this idea didn't come to developers. Which may mean that > this [being not that simple] is impossible. It supposes that the order of evaluation could be variable. If we imagine a constructor C with 5 parameters. If we evalutate: C (a, b, c, d, e) Here, the order of evaluation is a-b-c-d-e or e-d-c-b-a, I don't know, but in some logical order. If the tail recursion is, say, on the third parameter c, it supposes that a, b, d and e be evaluated before. And what policy use if, say, d is another tail recursion? In OCaml the evaluation order is not - supposed to be - specified. In this case, it would less be specified, since it could change depending on the parameters. Interesting... But I don't know if it is possible to implement that in the code generation. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr