3 ms·
> Find the most common path and fire a profiler at it as early as you can. The odds that there's some trivial win that will accelerate the code by huge amounts
by nicoburns 6y ago
> Find the most common path and fire a profiler at it as early as you can. The odds that there's some trivial win that will accelerate the code by huge amounts is fairly decent.
I've found that a profiler isn't even needed to find significant wins in most codebases. Simple inspection of the code and removal of obviously slow or inefficient code paths can often lead to huge performance gains.
- mattbee 6y agoI mean I love finding those "obvious" improvements too but how do you know you've succeeded without profiling it? ;)
- foobiekr 6y agoEvery piece of code I’ve looked at in my current job is filled with transformations back and forth between representations. It’s so painful to behold. Binary formats converted to JSON blobs, each bigger than my first hard drive (!), and then back again, often multiple times in the same process.