mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Improve existing benchmarks to prevent extreme optimizations
This commit is contained in:
parent
88847718f0
commit
ec2e4ba919
@ -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! {
|
||||
|
Loading…
Reference in New Issue
Block a user