Re: Just wondering, anyone as insane as Hades?

From: Johan Eenfeldt (
Date: 04/10/96

On Wed, 10 Apr 1996, Hades wrote:

> > 
> > Thats cool!
> > 
> > But what did it do to the CPU load? (During zone reboot and such)
> Well why would it have to search the files lineraly? To find the target
> room? Already though of that. When the world boots up it creates
> world_index[]. All world index is is a structure array (kinda like how the
> world used to be set up) and when you give it a vnum like so:
> world_index[1031].room that is a pointer to room vnum 1031, so there is no
> searching on zone resets, which is even FASTER than real_room because even
> real_room had to hit a for loop to do a binary search, whereas world_index
> just throws me a pointer without any searching. 

Well, you can't get it faster than that... Much of the array will stay 
unused though, as every virtual number isn't used. But if you have the 
memory to spare it is unbeatable.

Being somewhat constrained by the amount of memory available, I will 
probably use binary tree's or hash table's to search it.

/ Johan Eenfeldt
  Student, Computer Science Department @ the University of Uppsala

This archive was generated by hypermail 2b30 : 12/18/00 PST