Hot spot (computer programming): Difference between revisions

Content deleted Content added
Line 9:
===Iteration===
The example above serves to illustrate that effective hot spot detection is often an [[Iteration|iterative]] process and perhaps one that should always be carried out (instead of simply accepting that a program is performing reasonably). After eliminating all extraneous processing (just by by removing all the embedded comments for instance), a new runtime analysis would more accurately detect the "genuine" hot spots in the translation. If no hot spot detection had taken place at all, the program may well have consumed vastly more resources than necessary, possibly for many years on numerous machines, without anyone ever being fully aware of this.
==Instruction set simulation as a hot spot detector==
An [[instruction set simulator]] can be used to count each time a particular instruction is executed and later produce either an on-screen display, a printed program listing (with counts and/or percentages of total [[path length]]) or a separate report, showing precisely where the highest number of instructions took place. This only provides a ''relative'' view of hot spots (from an instruction step perspective) since most instructions have different timings on many machines. It nevertheless provides a measure of highly used code and one that is quite useful in itself when tuning an algorithm.
 
==See also==