criterion.rs icon indicating copy to clipboard operation
criterion.rs copied to clipboard

Preliminary results / Fast mode

Open PSeitz opened this issue 7 years ago • 4 comments
trafficstars

Hi, I really like criterion for benchmarking. Although one issue I have are the long runtimes in cases where it's clear that it's faster or slower. Currently I just use #bench upfront, which leads to a lot of code duplication. Would be nice if criterion would print preliminary results or execute #bench, to speed up code bench cycles.

PSeitz avatar Jan 13 '18 09:01 PSeitz

Thanks for the suggestion!

Yeah, I've considered adding a quick-iteration mode, possibly based on a command line flag. It certainly would be useful.

bheisler avatar Jan 13 '18 13:01 bheisler

One proposed behavior is that the benchmark suit (criterion group) is first executed for the smallest sample size (10) and then iteratively for fractions of the "recommended" sample sizes given explicitly or estimated by the criterion. The urgency of getting more precise results can be expressed as a sequence of weights (w_1,w_2,...,w_n), or, in the common case when they are equally urgent, by some special element.

JohnScience avatar Nov 15 '21 09:11 JohnScience

Also it would be nice to have an ability to continue the computation interrupted earlier.

JohnScience avatar Nov 15 '21 09:11 JohnScience

It seems that a fast mode is introduced in v0.4 (#535), maybe it will suffice for this feature request?

cmpute avatar Sep 21 '22 14:09 cmpute