-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
benchmark fix: use iter_custom to measure routine time exactly (#776)
### context the issue was identified when running sumcheck benchmark with setup but empty routine. The benchmark results shows there still ~60ms even routine is empty due to time was also measure something hidden out from desired routine ### solution by criterion [docs](https://github.com/bheisler/criterion.rs/blob/0.5.0/src/bencher.rs#L24-L33). `iter_with_setup` will measure the time when setup object implementing `Drop`, which might be the root cause. The most accurate way I found is switch to use `iter_custom` so we can control elapsed time accurately.
- Loading branch information
Showing
4 changed files
with
63 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters