]> git.lizzy.rs Git - rust.git/blob - library/std/src/num/benches.rs
Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into sync_cg_clif-2022-07-25
[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 }