1 #![feature(test)]
2 
3 extern crate test;
4 extern crate seahash;
5 
6 #[bench]
gigabyte(b: &mut test::Bencher)7 fn gigabyte(b: &mut test::Bencher) {
8     b.iter(|| {
9         let mut x = 0;
10         let mut buf = [15; 4096];
11 
12         for _ in 0..250000 {
13             x ^= seahash::hash(&buf);
14             buf[0] += buf[0].wrapping_add(1);
15         }
16 
17         x
18     })
19 }
20