April 2019
Intermediate to advanced
646 pages
16h 48m
English
The first source of bottlenecks is your code. The standard library provides all the tools that are needed to perform code profiling. They are based on a deterministic approach.
A deterministic profiler measures the time spent in each function by adding a timer at the lowest level. This introduces a bit of overhead, but provides a good idea of where the time is consumed. A statistical profiler, on the other hand, samples the instruction pointer usage and does not instrument the code. The latter is less accurate, but allows you to run the target program at full speed.
There are the two ways to profile the code: