Re: Binary tree thoughts...

From: Chris Jacobson (fear@ATHENET.NET)
Date: 01/06/98


On 1/6/98 7:21 PM, Mark A. Heilpern (heilpern@MINDSPRING.COM) stated:

>However, I wonder how much time in the mud is spent in
>converting vnum's to rnums, which is done by the
>real_[room|obj|mobile]() functions, also using a linear search.
>I haven't profiled my mud (am doing so right now...) but was
>wondering if anyone has profile data that would indicate this
>would or would not be a useful effort?

Actually if you use the OBUILD or OasisOLC patch, it comes with
replacements to real_* functions, that use a binary search.  To explain
it in a simple matter, it starts at 1/2 the top, checks if the vnum is
less than or greater than the current "location's" (top/2) vnum, or is
equal to, and then adjusts the check accordingly.

- Chris Jacobson


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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