Avatar
てか、 Swift の Dictionary って chaining じゃないのか。 Robin Hood Hashing って初めて知った。
2:49 AM
@omochimetaru
In this example, the first loop (populating one) finishes fairly quickly, as you would expect, but the second loop (copying into two) takes much, much longer.
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); } }
2:49 AM
まずこれが理解できてなかったのでそもそも自分がわかってないんだとわかった。