Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e788c7

Browse files
committed
factor/bench: big_uint only benchmarks numbers that num_prime can factorize properly (factorize error take a while to propagate)
1 parent b492abd commit 9e788c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/uu/factor/benches/factor_bench.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn factor_multiple_u128s(bencher: Bencher, (start_num, end_num): (u128, u128)) {
5252
}
5353

5454
/// Benchmark single > u128::MAX digits
55-
#[divan::bench(sample_size = 25)]
55+
#[divan::bench]
5656
fn factor_single_big_uint(bencher: Bencher) {
5757
// max u128 value is 340_282_366_920_938_463_463_374_607_431_768_211_455
5858
bencher
@@ -63,11 +63,11 @@ fn factor_single_big_uint(bencher: Bencher) {
6363
}
6464

6565
/// Benchmark multiple > u128::MAX digits
66-
#[divan::bench(sample_size = 25)]
66+
#[divan::bench]
6767
fn factor_multiple_big_uint(bencher: Bencher) {
6868
// max u128 value is 340_282_366_920_938_463_463_374_607_431_768_211_455
6969
bencher
70-
.with_inputs(|| (768_211_456_u64, 768_211_459_u64))
70+
.with_inputs(|| (768_211_459_u64, 768_211_461_u64))
7171
.bench_values(|(start_big_uint, end_big_uint)| {
7272
for digit in start_big_uint..=end_big_uint {
7373
let big_uint_str = format!("340282366920938463463374607431768211456{digit}");

0 commit comments

Comments
 (0)