MUD-Dev
mailing list archive

[ Other Periods  | Other mailing lists  | Search  ]

Date:  [ Previous  | Next  ]      Thread:  [ Previous  | Next  ]      Index:  [ Author  | Date  | Thread  ]

Re: [MUD-Dev] Introduction



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



[ Other Periods  | Other mailing lists  | Search  ]