Hi Guys,

I have a question about efficiency, because I am still extremely green
to c programming.

I am writing a function that will loop through all the rooms in an area,
check the exits and see if any of the areas attached are owned by
the clan attempting to claim.

I noticed that there are basically two methods of attacking this.
1 uses a MAX_KEY_HASH, like in exlist.

and one that uses a for loop like rlist.

Now I am guessing that if I needed to loop through all the vnums,
then the hash would be more efficient, but if I only need to check the
exits on 100-300 vnums the for would be more efficient.

In truth I have no idea of how the hash is moving through memory
as compared to the for loop.

1 so my question is which would be more efficient, and would anyone
know of a resource that would explain how to use this hash, because
I am totally lost.  I can hack my way through it very easily, but I would
like to start to learn how memory is used and how to make the most
efficient use of it.

Thanks.
Rick.

Reply via email to