]> git.lizzy.rs Git - rust.git/blob - library/std/src/num/benches.rs
Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into sync_cg_clif-2021-02-01
[rust.git] / library / std / src / num / benches.rs
1 use test::Bencher;
2
3 #[bench]
4 fn bench_pow_function(b: &mut Bencher) {
5     let v = (0..1024).collect::<Vec<u32>>();
6     b.iter(|| {
7         v.iter().fold(0u32, |old, new| old.pow(*new as u32));
8     });
9 }