Added option to manually specify a reference to compare the results to. #744
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was interested in the functionality discussed in #579 and #577.
Sadly the former PR has been stale for over a year.
So i have tried to effectively take the work from there, make it fit with the changes that have happend since then and also address the comments in the PR.
There are currently still two points that i am myself unsure about.
I have used the standard
std::cmp::Ordering
for the ordering compared to the reference. However, i feel that the naming is not actually clear at a first glance. Namely thatOrdering::Less
corresponds to a faster time (the runtime is less). It might be worth to create a distinct enum that maps to this (converts from) as suggested in the original PR review.I am also not sure if the statements
faster than
andslower than
are the best. Particularly the latter feels a bit unintuitive to me.Maybe something like
0.2 times as fast
would be better than5.0 times slower
?