std.benchmarking and getting rid of TickDuration

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 5 08:51:48 PDT 2015


Should the examples have `pragma(inline, false)` on the
benchmarked functions? I'm not so worried about inlining as I
am about const folding the benchmarked expressions away.

Concerning the module review I tend to agree with you. It
would only be ... well if I said in std.datetime the functions
were not so prominent, and went under the radar, but as their
own module they have to add enough value to warrant that. But
I am ok with that, too. std.benchmark is not something you'd
use in a production environment on a daily basis like you would
std.json, std.logger or std.allocator and you didn't add new
API.

If there _was_ a review for a new module I would swamp your
progress with feature requests like "validation of return
value of benchmarked functions" or "benchmark for x seconds
with y iterations of the inner loop for comparing benchmarks
for cases where one function is orders of magnitudes faster
than the other". And I'm sure others have lots of ideas, too
and it will turn into an endless bike-shedding discussion
and take another 6 months to get this merged and no one wants
that, right?

-- 
Marco



More information about the Digitalmars-d mailing list