Profiling and memory use
Which area is the strongest first candidate for optimization?
Examples
Worked example
Input
Parsing takes 15 ms, lookups 80 ms, formatting 5 ms.
Expected output
Lookups.
Hints and solution
Hint 1
Write down the starting state and walk through one example by hand.
Reveal worked answer
They account for 80% of the time, so reducing that cost can have the largest effect.