September 2019
Intermediate to advanced
352 pages
8h 3m
English
Topic 39 | Algorithm Speed |
In Topic 15, Estimating, we talked about estimating things such as how long it takes to walk across town, or how long a project will take to finish. However, there is another kind of estimating that Pragmatic Programmers use almost daily: estimating the resources that algorithms use—time, processor, memory, and so on.
This kind of estimating is often crucial. Given a choice between two ways of doing something, which do you pick? You know how long your program runs with 1,000 records, but how will it scale to 1,000,000? What parts of the code need optimizing?
It turns out that these questions can often be answered using common sense, some analysis, and a way of writing approximations called the Big-O notation.
Read now
Unlock full access