Optimising Speed 1 (time)
Examine time/space tradeoffs
Chose: throughput / CPU time / wall-clock time?
Chose: average or worst-case values?
- Randomised algorithms and hash tables vs brute-force
Implement bounded work and data queues to avoid overflows and sluggish recovery from activity spikes
Notes:
EXAMPLE: Web browser caching to eliminate latency and bandwidth delays; memory functions and (caching) lazy-evaluation mechanisms.
Bounded Queues of work: (eg collapse and discard pointer/mount events) so that you don’t queue up lots of (possibly redundant) work and lose user responsiveness. In many cases only the last value of some input parameter is important. To see how not to do this, look at Excel!
- Do you know what takes most time to re-fetch or re-compute? Can you cache it?