Speed
The absolute speed of an algorithm for a given input can simply be measured as the duration of execution (or clock time) and the results can be averaged over several executions to eliminate possible random effects. Most modern processors operate in a multi-processing and multi-programming environment so consideration must be made for parallel processes occurring on the same physical machine, eliminating these as far as possible. For superscalar processors, the speed of a given algorithm can sometimes be improved through instruction-level parallelism within a single processor (but, for optimal results, the algorithm may require some adaptation to this environment to gain significant advantage ('speedup'), becoming, in effect, an entirely different algorithm). A relative measure of an algorithm's performance can sometimes be gained from the total instruction path length, which can be determined by a run time Instruction Set Simulator (where available).
An estimate of the speed of an algorithm can be determined in various ways. The most common method uses time complexity to determine the Big-O of an algorithm. See Run-time analysis for estimating how fast a particular algorithm may be according to its type (example: lookup unsorted list, lookup sorted list etc.) and in terms of scalability—its dependence on 'size of input', processor power and other factors.
Read more about this topic: Algorithmic Efficiency
Famous quotes containing the word speed:
“Spig Wead: Ive been thinking what a heel Ive been about you and about my own kids. I dont know, when I do something, I go all the way. Living. Gambling. Flying. I tap myself out. I guess thats the way I want it to be. Maybe even the way I am.
Minne Wead: Star-spangled Spig. Damn the martinis, full speed ahead and dont give up the ship.”
—Frank Fenton, William Wister Haines, co-scenarist, and John Ford. Spig Wead (John Wayne)
“If it be aught toward the general good,
Set honor in one eye, and death ith other,
And I will look on both indifferently;
For let the gods so speed me as I love
The name of honor more than I fear death.”
—William Shakespeare (15641616)
“There exist certain individuals who are, by nature, given purely to contemplation and are utterly unsuited to action, and who, nevertheless, under a mysterious and unknown impulse, sometimes act with a speed which they themselves would have thought beyond them.”
—Charles Baudelaire (18211867)