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 WAA13394; Mon, 11 Aug 2003 22:04:09 +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 WAA08253 for ; Mon, 11 Aug 2003 22:04:08 +0200 (MET DST) Received: from ep09.kernel.pl (ep09.kernel.pl [212.87.11.162]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h7BK46f12004 for ; Mon, 11 Aug 2003 22:04:06 +0200 (MET DST) Received: (qmail 3682 invoked by uid 566); 11 Aug 2003 20:04:02 -0000 Date: Mon, 11 Aug 2003 22:02:55 +0200 From: Michal Moskal To: Hal Daume III Cc: Tahir H Butt , caml-list@inria.fr Subject: Re: [Caml-list] comparing references Message-ID: <20030811200255.GA12623@roke.freak> Mail-Followup-To: Hal Daume III , Tahir H Butt , caml-list@inria.fr References: <20030811192552.GA8711@roke.freak> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 kernel:01 0700,:01 comparison:02 gcs:03 wrote:03 object:03 addresses:96 types:03 stuff:05 aug:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Aug 11, 2003 at 12:57:46PM -0700, Hal Daume III wrote: > > > I ask because my sum > > > types can be big (I'm dealing with trees), so it would be good if when I > > > want to check if two trees are the same, all I need to do is look at the > > > references to them. > > > > Use == if you want to compare addresses. > > How much do you need to worry about, ex., the GC moving stuff around and > messing this up? You don't need to worry at all. GC moves all references to given object at once. So comparison results are always the same. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h ------------------- 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