Python speed
jcm
grumble at usa.net
Wed Jul 11 12:56:46 EDT 2001
Aahz Maruch <aahz at panix.com> wrote:
> In article <9ifo90$4hh$1 at news.mathworks.com>, jcm <grumble at usa.net> wrote:
>>
>>Well, I say this because I've written a mud engine in Python and it's
>>slow. Using this engine on a PII 266 running RedHat 6.1, 400
>>wandering monsters (with nothing else going on in the mud) will peg
>>the cpu. In a production mud, you might want to do something
>>intelligent about wandering monsters (like have them stop wandering if
>>no players are nearby to save cpu-time), but there will also be lots
>>else going on.
> What we have here is a clear failure to communicate.
> Look, if you have *one* monster sitting in a computation-intensive loop,
> you're going to peg the CPU no matter what language you're using. The
> question is, how efficient and fast is each pass through the loop, and
> how responsive is the loop to external input? Don't make the mistake of
> measuring the wrong things.
Sure, you can have your monsters do fractal-generation if you want and
you'll use up lots of cpu time. But analyzing the cpu-cost of
wandering monsters seems like a reasonable thing to do. Maybe I
shouldn't have bothered bringing up a specific example unless I was
prepared to go into more detail. Anyway, I maintain that
network-speed isn't the only thing that can reasonably slow down a
mud.
More information about the Python-list
mailing list