[OPTIMIZATION] RAM (previously: Random Thought)

From: Treker (treker@positron.net)
Date: 10/10/00


>
> On Tue, 10 Oct 2000, Jason Pullara wrote:
>
> [snip]
> >
> > would it be possible (or, more appropriatly, a good idea) to have the
> > stuff parsed like this...
> >
> > First, looks through the MCL.. if it doesnt see it, goto the Action Text
> > (like slap, spit, moan ect...),
> > then if its not found just give the typo message..
> >
>
> This would not really cause a problem per se, it just means that every
> typo involves a full iteration check of every single (I believe--Circle
> doesn't use any other searching algorithm, does it?) command and social.
> If you're going to do this, at least make sure you're using a better
> search algorithm like binary search--you'll just have to make sure
> everything is sorted before you start, or else you won't get very far.

That reminds me, Circle is one of the most resource-guzzling MUDs I've seen.
This does not surprise me, as Circle IS a code BASE for people to use and
expand.  However, is memory / cpu optimization being planned (ie: new,
faster, less-CPU-hogging search algorithms, etc) for future patches or
versions?

STL, although not exactly C, has some good sorting/searching algorithms
which could be implemented using standard C code (or using the actual C++
function calls).  Binary searches could be more efficient in some cases.  So
would sorting files for quicker access later...or better yet, reducing
memory load by only "memorizing" the necessities.  Well, it's really open
for discussion and trivial whether or not these things would actually reduce
CPU/MEM usage...but since I'm very masochistic right now (after writing a 10
page essay for English), I think I'll go take a look at where I might do
these things.  Three out of the five coders I've spoken to in the past month
switched to ROM because it is less requiring of their systems, and I quote
(not my words!) "Faster"...

I hope I am helping,
-Treker

>
> Basically, you're just rearranging the current system as a beautification,
> because you don't like do_action() in the table, as far as I can see.  I'd
> suggest looking at the code included with the social editor (AEDIT) patch
> that is on the FTP site, to see exactly how it stores/sorts/separates
> commands and socials.  It might be the next step in what you're working
> out, anyway.
>
> -Tony.


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT