It was recently discovered that some surprising operations on Rust’s standard hash table types could go quadratic. Perhaps the simplest illustration is this snippet from a comment, here simplified even further: use std::collections::hash_set::HashSet; fn main() { println!("populating..."); let mut one = HashSet::new(); for i in 1..5000000 { one.insert(i); } println!("cloning..."); let mut two = HashSet::new(); for v in one { two.insert(v); } } In this example, the first loop (populating one...