🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2814

Re: Tables to memory

#2814
From: John P. McGrath
Date: Fri, 14 Jan 2000 00:00
30 lines
1550 bytes
On Thu, 13 Jan 2000 08:02:05 -0400, Patricio Vera S. wrote:

FYI, cross-posting is against the rules for this news server.

> I need load some tables to memory for a rapid search (i don't
> want use D.B., just text files), i want to know which is the
> better Collection to do it. My tables has a key area, where
> the seek for partial keys goes from the start to the end, and
> the data has anything.

This sounds like a Map to me.

There are a number of Map implementations, and you have not provided 
enough information to determine which is best.  But here are some you 
should look at:

   HashMap - A hash table implementation of Map.  Provides fast lookup, 
but can incur significant overhead if the HashMap has to be expanded.

   Hashtable - Very similar to HashMap, but is synchronized, which is 
good if you need to access it from multiple threads, but is slower as a 
result.

   TreeMap - A tree implementation of Map.  Slower than HashMap, but does 
not incur the expansion costs that HashMap does.

-- 
John P. McGrath
<JPMcGrath@fast.net>
<jpm@nscs.fast.net>
Technical Details
Message-ID: <MPG.12e8a841e91bc97998972e@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <85kat2$6un6@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,3f037ce4a47f85a2
X-Google-Attributes: gid1089d0,public
From: John P. McGrath <JPMcGrath@fast.net>
Subject: Re: Tables to memory
Date: 2000/01/14
Message-ID: <MPG.12e8a841e91bc97998972e@forums.borland.com>
X-Deja-AN: 572476512
References: <85kat2$6un6@bornews.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.api