[Issue 11783] Make std.datetime unittesting faster
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 22 01:12:38 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11783
--- Comment #5 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-12-22 01:12:36 PST ---
It wouldn't surprise me if _assertPred adds quite a bit to it, because of all
of the template instantiations that get generated for it. That might be part of
why the tests take so long. Some of the tests were refactored to use plain
assertions after assertPred failed to get through the review process, but a
good chunk of them still use _assertPred, so if those template instantions
incur enough of a performance hit, then removing those may help cut down on the
compilation time for the tests (AFAIK, the time for the tests includes both the
compilation time and the running time, but I don't know - if it's just the
running time, then this probably isn't a factor).
I do know for a fact though that the assertThrown tests are very expensive and
cut down on them at one point because of the ridiculously low performance of D
exceptions. I really don't like cutting out too many of them, as I think that
the failure cases should be well tested as well, but it's possible that those
tests alone are a large portion of the running time. That's why I really wish
that issue# 9584 would get some attention. Exception performance is one place
where Java completely blows us out of the water, and while it might not matter
a lot for production code (as exceptions should be relatively rare there), it's
very detrimental to unit tests which test failure cases.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list