[MUD-Dev] Introduction

Michael Hohensee michael at sparta.mainstream.net
Thu Aug 14 18:43:54 CEST 1997


clawrenc at 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 at 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



More information about the mud-dev-archive mailing list