Slow performance compared to C++, ideas?
Peter Williams
pwil3058 at bigpond.net.au
Fri Jun 7 17:25:45 PDT 2013
On 07/06/13 17:28, Walter Bright wrote:
> On 6/6/2013 11:30 PM, Peter Williams wrote:
>> I use it to make sure that my unittests are complete.
>
> Awesome!
>
> -cov is also useful for:
>
> 1. debugging - if your unittests can't seem to cover certain lines,
> those lines might indicate a bug
That's what I meant by "unittests are complete" i.e. they cover all of
the code.
>
> 2. performance - giving usage counts of lines tells you where the 'hot'
> paths are, and those can be hand-tuned
>
> It's also quite possible to have the compiler read the coverage report,
> use it to identify the hot paths, and rearrange the code while
> optimizing so that the hot paths have the fewest branches. Profile
> guided optimization, if you will.
>
>> Peter
>> PS It would be nice if it printed the overview (i.e. % complete line)
>> to stdout
>> as well as sticking it in the coverage file report.
>
> Please file this as an enhancement request on bugzilla.
Done.
Peter
More information about the Digitalmars-d
mailing list