|
|
|
|
|
by gen220
2131 days ago
|
|
Totally agreed. Getting comfortable with a profiler is a superpower. FWIW, this is also one of Rob Pike's rules of programming: > Rule 1. You can't tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don't try to second guess and put in a speed hack until you've proven that's where the bottleneck is. It's implicit, but the "proven" part implies use of a profiler. |
|
Also, bottlenecks happen in surprising places, and allowing slow/bad code just because the profiler doesn't scream about it on the development machine is a recipe for surprising performance issues in the future. The slow code might become a problem when a user has slightly different task for the program.