|
|
1. CPU time, if speed is what we're interested in, is affected by very many factors, many of which are not related to the algorithm itself:
-- which computer
-- how heavily is it loaded
-- which programming language
-- which compiler
-- hidden factors can swamp the ones you're trying to measure:
-- array-bounds checking
-- relative speeds: array indexing, record access and pointer following,
-- overhead for procedure calls
-- I/O
2.Which test data? It is true that `constant time' algorithms, by definition, take the same amount of time on all inputs. But most algorithms are not constant time so we cannot measure efficiency as a single number; it must be expressed as a function of the input.
|
|
Last modified 22/May/97