Profiling allows you to improve the speed of your programs for comparatively little work.
The idea is to identify so called hot-spots in your program - ie those parts where the program spends most of its time.
When we know where they are, you can make speed improvments to the code where it matters.
There's no point doubling the speed of code that runs 1% of the time because it won't be noticed. On the other hand, doubling the speed of code that runs, say, 20% of the time should save 10% on your program's execution time.... read more