[MUD-Dev] Naming and Directories?
adam at angel.com
Sat Mar 13 13:21:41 New Zealand Daylight Time 1999
On Fri, 12 Mar 1999, Matthew D. Fuller wrote:
> On Thu, Mar 11, 1999 at 11:44:08PM -0800, Mark Gritter remarked
> > A potential drawback I see is increased memory usage (perhaps prohibitely
> > so.) Benefits to CPU time by doing "smarter" lookups are probably not
> > likely to be a big win.
> Rule of thumb.
> Memory is cheap. You can upgrade memory (and storage to an even greater
> degree) quicker, easier, less intrusively, cheaper, and further than CPU.
> In most of my programs, scripts, etc in my Real Work (tm) I ALWAYS blow
> memory left and right to save on CPU time.
> Reference arrays are my favorite gimmick with these things. Sorta a
> 'poor man's RDBMS' ;)
Well, keep in mind that the slowest part in modern computers is NOT the
CPU, but rather is the need to push data around. Hence the introduction
of tons of cache both on the processor and the motherboard to try to speed
Case in point: when we started working on Revenant, the target system was
a P133. Our lighting routines were written in highly-optimized asm and
made extensive use of lookup tables for everything from RGB lighting
calculations (intensity * normal * hue) to square roots to dot products.
As computers got faster, we found that the table lookups actually started
to slow the system down, because it could keep all of them in the L1 or L2
cache, and the processor could actually compute those numbers *faster*
on the fly than it could fetching from memory.
MUD-Dev maillist - MUD-Dev at kanga.nu
More information about the MUD-Dev