3 ms·
Could you link to the code for `test.rs`?
by azth 11y ago
Could you link to the code for `test.rs`?
- masklinn 11y agofn main() { let mut sum = 0i64; for _ in 0..200 { let items = (0..1000000).zip(1..1000000).map(|(a, b)| a + b); sum = items.enumerate().filter(|&(i, _)| i % 100 == 0).fold(0, |acc, (_, v)| acc + v); } println!("{}", sum); } (note that the addition part does some extra work since it iterates on the whole source instead of skipping ahead)