Chapter 10 of 10All chapters
Chapter 10 of 10
In practice
What this is actually for.
Rarely from scratch
You will use library sorts, maps and sets far more often than you implement them. The value is knowing what they cost so you can pick the right one and read a profile honestly.
- Most real slowness is a database query or a network call, not an algorithm.
- Measure before optimising, then measure again afterwards.
Where it does matter
When data grows by orders of magnitude, the difference between O(n) and O(n squared) stops being academic. That is the moment this knowledge pays for itself.