Defining Performance (Cont.)
The phrase “X is n times faster than Y” or “X is n times as fast as Y” means
PerformanceX / PerformanceY = n
If X is n times as fast as Y, then the execution time on Y is n times as longer as it is on X:
PerformanceX / PerformanceY
= Execution timeY / Execution timeX = n
Relative Performance
If computer A runs a program in 10 seconds and computer B runs the same program in 25 seconds, how much faster is A than B?
PerformanceA / PerformanceB
= Execution timeB / Execution timeA
= 25 / 10 = 2.5
A is therefore 2.5 times as fast as B.
In the above example, we could also say that computer B is 2.5 times slower than computer A, since
PerformanceA / PerformanceB = 2.5
means that
PerformanceA / 2.5 = PerformanceB