swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How To Profile A Program


From: Marcus G. Daniels
Subject: Re: How To Profile A Program
Date: 12 Apr 2000 09:25:52 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "PJ" == Paul E Johnson <address@hidden> writes:

PJ> I've been nagging people for them for a long time,
PJ> and the best answer I get is "don't write programs that waste
PJ> time".  Don't recaculate things if you can save results and reuse
PJ> them is a common tidbit.  However, one of the authors of XFree86
PJ> recently told me this is subject to qualification.  Since the CPU
PJ> is faster than RAM access, it may save time to recalcuate than to
PJ> store something large.

For what it's worth, I agree with Nick.  Optimization should be a last
resort.  I believe this notion of having a coding tricks checklist for
writing a model for speed is just the wrong way to think.  It is silly
to say "here's a five page step-by-step guide of what to do once you
know the slowest five functions".  Most of the time the only way to
achieve major speedups is to change the algorithms in the model.  That
means stepping back from the code for a moment and thinking about
the model.  Yes, the model -- not coding tricks, and not the simulator.

Yes, in exceptional cases there are technical ways to dance around a
problem and get significant speedups.  But I think, Nick's point is
very well taken: the performance benefits of hacking-up ad-hoc
optimization code instead of using well-understood components just
usually isn't worth the risk.  


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]