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 LAA20503; Wed, 13 Jun 2001 11:55:56 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA20313 for caml-list@pauillac.inria.fr; Wed, 13 Jun 2001 11:55:55 +0200 (MET DST) 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 SAA06533 for ; Tue, 12 Jun 2001 18:10:22 +0200 (MET DST) Received: from localhost.localdomain (ppp138.dyn146.pacific.net.au [210.23.146.138]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f5CGAHj23015 for ; Tue, 12 Jun 2001 18:10:19 +0200 (MET DST) Received: from ozemail.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id CAA08763; Wed, 13 Jun 2001 02:10:02 +1000 Message-ID: <3B263EDA.1F327F86@ozemail.com.au> Date: Wed, 13 Jun 2001 02:10:02 +1000 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Brian Rogoff CC: David McClain , caml-list@inria.fr Subject: Re: [Caml-list] Evaluation Order References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Rogoff wrote: > > Perhaps binding record fields left to right makes sense, > > And tuples, and (::), and ... > > Why not make the default correspond to everyone's intuition? It may clobber performance, and, it isn't all that obvious anyhow. Here is the 'classic' example from C: x[i++] = y[i++] [If you think you know the answer .. just consider that i might alias x :-] If the order of evaluation is strictly specified, a lot of results must be written to memory prematurely. It is one reason why C is slower than Fortran. I suspect it is processor dependent. C specifies sequence points: places where write operations must be completed before continuing. If you do a read before that, the result is indeterminate. The rules try to make efficient 'in register' operations possible and allow enough flexibility to reorder instructions to suit a processors caching and pipelining model -- while still making common idioms work. I'm no expert. I simply advise caution here. _Functional_ expressions can be optimised in useful ways at very low processor dependent levels. Lets not stop the Ocaml team trying to beat both C _and_ Fortran! -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net ------------------- 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