A pragmatic definition of "efficiency"
There are multiple ways to solve a computational problem as we have seen with linear and binary search. Measuring their tradeoffs involves analyzing their efficiency.
Efficiency here means how an algorithm utilizes resources, namely the amount of time (and space) it uses. Moreover, we would want to know how its resource consumption will scale with increasing input size.
We need to establish the vocabulary and the mathematical machinery needed to talk about the efficiency of algorithms. For this, we introduce the RAM model of computation in this chapter and asymptotic notation in the next chapter.
Resources
- Wikipedia entry on Algorithmic Efficiency.
- Wikipedia entry on Analysis of Algorithms.