Slow performance compared to C++, ideas?
Walter Bright
newshound2 at digitalmars.com
Fri Jun 7 00:28:03 PDT 2013
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
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.
More information about the Digitalmars-d
mailing list