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 RAA14582; Mon, 11 Oct 2004 17:37:42 +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 RAA14576 for ; Mon, 11 Oct 2004 17:37:41 +0200 (MET DST) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9BFbfCN009727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 11 Oct 2004 17:37:41 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay01.plus.net with esmtp (Exim) id 1CH2Eu-0001tT-4b for caml-list@inria.fr; Mon, 11 Oct 2004 15:37:32 +0000 From: Jon Harrop To: caml-list@inria.fr Subject: Re: [Caml-list] About Obj (was Recursive lists) Date: Mon, 11 Oct 2004 16:33:03 +0100 User-Agent: KMail/1.6.2 References: <41669437.3010201@yahoo.it> <16746.15832.409677.764564@gargle.gargle.HOWL> <416A8CDA.7060407@univ-savoie.fr> In-Reply-To: <416A8CDA.7060407@univ-savoie.fr> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200410111633.03459.jon@jdh30.plus.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 416AA8C5.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 2004:99 38,:01 raffalli:01 filliatre:01 brandon:99 immutable:01 optimise:01 improvment:01 slower:01 christophe:01 penalty:02 thread:02 module:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Monday 11 October 2004 14:38, Christophe Raffalli wrote: > Jean-Christophe Filliatre wrote: > > This shouldn't be advised, and not even posted on this list. Yes, why is "Brandon" in the filter but "Obj" isn't? :-) > And how do you write a tail recursive map doing only one structure > traversal (which is important with the penalty for memory access) on > immutable list without the Obj module? You avoid the use of Obj magic at all costs! Then you are much more likely to get programs which work. Finally, you optimise them in terms of what you can do in the language. > Let me correct my statement: it could be used after some improvment, > because it is two times slower on small lists (after some timing) Yes, your Obj implementation is substantially bigger, more complicated, more error prone and more costly on small lists. Just forget this whole thread ever happened and consider using a different data structure. :-) Can Obj not be hidden so that people can't use it so easily? Cheers, Jon. ------------------- 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