[Home] [Groups] - Message: [Prev in Group] [Next in Group]
3044: Re: [MUD-Dev] Introduction
[Full Header] [Plain Text]
From: Michael Hohensee <michael@sparta.mainstream.net>
Newsgroups: nu.kanga.list.mud-dev
Date: Thu, 14 Aug 1997 18:43:54 -0400
References: [1]
Organization: Kanga.Nu
clawrenc@cup.hp.com wrote:
>
> Another address to the too-many-objects-at-a-location problem is to
> make the list of objects at a location instead a table of hashed
> buckets.
>
But what about the memory overhead of an empty hashtable? Linked lists
can be better, for small numbers of objects...
There is a nice solution to this problem that uses C++. By using an
abstract object container class (one which defines the interface with
the rest of the code), we can change from linked-list storage to
hashtable storage to any other kind of storage without having to change
the outside code.
This way, if a linked-list container gets too full (more than X
objects), it will automagically transfer its contents to a hashtable
container-- and back, if the objects go away.
HOWEVER, I don't know if this will work with Java... (which is what he
said he wrote it in?)
--
Michael Hohensee michael@sparta.mainstream.net
http://www.geocities.com/SiliconValley/Heights/9025/
Finger me for my PGP Public Key, or use:
http://sparta.mainstream.net/michael/pgpkey.txt