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 AAA17650; Sat, 20 Mar 2004 00:58:39 +0100 (MET) 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 AAA18151 for ; Sat, 20 Mar 2004 00:58:38 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from web40306.mail.yahoo.com (web40306.mail.yahoo.com [66.218.78.85]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i2JNwaHd007647 for ; Sat, 20 Mar 2004 00:58:37 +0100 Message-ID: <20040319235836.4930.qmail@web40306.mail.yahoo.com> Received: from [24.153.223.97] by web40306.mail.yahoo.com via HTTP; Fri, 19 Mar 2004 15:58:36 PST Date: Fri, 19 Mar 2004 15:58:36 -0800 (PST) From: Bob Bailey Subject: Re: [Caml-list] Question about string ref and Hashtbl. To: Caml List In-Reply-To: <405B78D5.9040605@1969.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 hashtbl:01 hash:01 passing:01 bug:01 faq:01 faq:01 beginner's:01 beginners:01 bin:01 caml-bugs:01 ocaml:01 caml:01 caml:01 groups:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 253 that's what I was doing before I started down this road. I am actually concatinating the strings to make a larger hash of string words... (representing a hierarchical name type thing) SO I am actually copying strings all over the place... I am also reading a new set of data from a file that has information that I need to cross reference... So that's why I am trying to centralize strings. That way I can create integer indexes into a dictionary and save memory by not carrying around large numbers of strings that are really duplicates. thanks though bob --- Karl Zilles wrote: > Bob Bailey wrote: > > I am trying to only store the string once in memory. This will allow > me to store the > > index of the string in the dictionary instead of copying the string > all over > > memory. > > You can just pass a string around.. it doesn't actually make a copy of > the data.. what you're passing is just a pointer. > > ------------------- > 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 __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com ------------------- 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