diff options
| author | Tim Vermeulen <tvermeulen@me.com> | 2019-02-27 11:46:37 +0100 |
|---|---|---|
| committer | Tim Vermeulen <tvermeulen@me.com> | 2019-02-27 11:46:37 +0100 |
| commit | ec2e4ba919a65a972019925b5b33d0f309f467fc (patch) | |
| tree | 02c4f6da1f2918f16e107bba16b3ac579a583b01 | |
| parent | 88847718f0cca57124cbd1bce12fc938c5bde088 (diff) | |
| download | rust-ec2e4ba919a65a972019925b5b33d0f309f467fc.tar.gz rust-ec2e4ba919a65a972019925b5b33d0f309f467fc.zip | |
Improve existing benchmarks to prevent extreme optimizations
| -rw-r--r-- | src/libcore/benches/iter.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/benches/iter.rs b/src/libcore/benches/iter.rs index 5cc2bce846d..4f3d6f37902 100644 --- a/src/libcore/benches/iter.rs +++ b/src/libcore/benches/iter.rs @@ -185,13 +185,13 @@ bench_sums! { bench_sums! { bench_filter_sum, bench_filter_ref_sum, - (0i64..1000000).filter(|x| x % 2 == 0) + (0i64..1000000).filter(|x| x % 3 == 0) } bench_sums! { bench_filter_chain_sum, bench_filter_chain_ref_sum, - (0i64..1000000).chain(0..1000000).filter(|x| x % 2 == 0) + (0i64..1000000).chain(0..1000000).filter(|x| x % 3 == 0) } bench_sums! { |
