Rust's iterators are fast and can match loops with preallocation! https://www.reddit.com/r/rust/comments/3spfh1/does_collect_allocate_more_than_once_while/