Link-list vs Array

From: Harvey Gilpin (
Date: 04/16/96

Sammy <> wrote:

>On Mon, 15 Apr 1996, Harvey Gilpin wrote:
[Using threads to prevent lag in olc]
>> That's one option yes.  Though I still prefer fixing the data
>> structure to fixing it's consequences.
>I think no matter how it's done there's going to be some drawback.  When 
>you use pointers you're trading either lookup time or some extra memory 
>for the realnum lookup table to get more efficient prototype creation.  I 
>think using pointers is an improvement but I'm not sure I'd call it 
>fixed.  Just new and improved :)

The only drawback I can see is that hash table takes up a few K of
memory that would otherwise be free.  Everything else becomes faster.
No more table look ups to see where a player/mob/obj is, or to where
the room leads.  The real_room() function is just as quick as before,
and olc and funky spec_procs become a breeze.

I'd call it fixed }:>

>  I don't like allocating a lot of extra 
>memory that goes largely unused, but it seems to work pretty well.

Well, I guess it's all down to individual priorites in the end.
Resources vs efficiency.



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