Why C++ compiles slowly
newshound2 at digitalmars.com
Wed Aug 25 13:37:45 PDT 2010
> Wed, 25 Aug 2010 19:08:37 +0000, dsimcha wrote:
>> Yeah, but unless you use a profiler, how are you going to find those
>> spots where N isn't as small as you thought it would be?
> Test-driven develoment, automatic testing tools,
Neither of those are designed to find bottlenecks, and I've never seen one that
could. Besides, why avoid a tool that is *designed* to find bottlenecks, like a
> common sense?
Is not a substitute for measurement. Like I alluded to, I've seen lots of
programmers using common sense to optimize the wrong part of the program, and
failing to get useful results. Yes, I've had them *insist* to me (to the point
of yelling) that that's were the bottlenecks were, until I ran the profiler on
their code and showed them otherwise.
> Sometimes the profiler's output is too fine-grained.
There are many different profilers, with all kinds of different approaches. Some
high level, some at the instruction level, some free, some for pay. All of them
are cheaper than spending hundreds of hours optimizing the wrong part of the code.
More information about the Digitalmars-d