[MUD-Dev] newbie

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Fri Nov 7 08:14:33 CET 1997


[Gunther:]
:> abilities. The real tradeoff is w/ hardcode you increase your cpu usage,
:> and softcode it chews up your ram. Most good mu*s tend to have a balance
:> of both types of programmed systems. 
:
:Does this tradeoff stem from the nature of softcode/hardcode?	I've
:noted that the two most widely used examples (LP for softcode and DIKU for
:hardcode) show this to be the case, but I had always assumed that it was
:(flaws in the???) the core server designs that caused this phenomenon, and
:that they were accomplished in hard/soft code to be purely coincidental.
:For example, a quick glance of DIKU-clone source shows that 80-90% of the
:CPU drain comes from the pulse/heartbeat/tic system where everything is
:polled for continous update.  (disclaimer:  that isn't meant as a flame of
:the source...I actually started with a gutted Circle many moons ago, but
:the first thing I did was strip that system and put in an event-driven
:one, which seemed to speed things up conciderably)  On the other side of
:the coin, I could see where an eternal language could increase the RAM
:overhead (caching the language itself, as well as code-bloat from having
:multiple people generating generally unoptimized code), but a well managed
:system would minimize this and the bloat would be negligable.
:Any thoughts?

One of the areas I work in at work is communication protocols with various
hardware devices. In that work, it is clear that a polling system can
reduce the latency over an event (interrupt) driven system, but that it
is at the expense of increased CPU drain. I suspect a similar rule would
necessarily apply to MUDs as well - polling will increase your CPU useage,
simply because not all polls will show up anything useful, and hence the
work done to poll is wasted for that cycle.

I don't see that having a softcode language in the system requires more
memory. My system is heavily softcode based, and will run quite handily
in 2 Meg of memory. I believe, from the little I've looked at it, that
the style of coding and inheritance in LP leads to excessive duplication
and memory use, so it may not be the best example.

--
Chris Gray   cg at ami-cg.GraySage.Edmonton.AB.CA



More information about the mud-dev-archive mailing list