(2*) Benchmarks

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 07/31/97


I've added checks to make sure the buffer is large enough and other fun
things. And (horrors), I actually commented it.  See below for benchmarks.

I couldn't find anything large enough to test the overflow problems or the
mismatch handling.  Boards aren't grouped because they send_to_char() in
one big chunk (not that you would want a (2*) in the middle of a board post
anyway).  Everything else that outputs large numbers of the same line in
one pass will also work. (Drop, get, put, look, eq, inventory, the dump,
etc)

As usual, report any problems, additions, etc to me.

I've created a function to test it:

ACMD(do_qload)
{
  ACMD(do_load);
  int number = atoi(argument);

  while (number--)
    do_load(ch, "obj 1", 0, 0);
}

500H 100M 82V > qload 38000
(38000*)You create a pair of wings.
500H 100M 82V >
(2*)The wandering spirit picks up some trash.
500H 100M 82V >
(3*)The wandering spirit picks up some trash.
500H 100M 82V >
The wandering spirit picks up some trash.
500H 100M 82V >

Benchmarks: (P133, 16mb RAM, Linux on T1) (Me on a 14.4 modem PPP link)
        (timed from enter to output)

#loop {1,1000} {load obj 1}     1 minute 40 secomds
qload 1000                      < 1 second
qload 10000                     < 2 seconds
qload 100000                    1 minute 4 seconds
                        (100000*)You create a pair of wings.

Look with (1000*)               ~1 second
Look with (10000*)              < 2 seconds
                        (10000*)A pair of wings is sitting here.

So unless you leave _thousands_ of identical objects in your rooms, you
won't even notice a delay (especially with Internet lag today).  Any string
that doesn't match only incurs the minor overhead of a strstr() call.

That should take care of any questions about how slow it is. :)

-George, who solved a problem _after_ the demand has passed... ;)


     +------------------------------------------------------------+
     | 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/08/00 PST