aboutsummaryrefslogtreecommitdiff
path: root/primrose/mem_profiling/hashset_128m.rs
blob: 91a59bf9dc5cb850a62b669d04ea4b769c16cf57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use primrose::tools::gen_dataset_128;
use primrose::traits::Container;
use std::collections::HashSet;

fn hashset_insertion_128m() {
    let s: &mut dyn Container<u32> = &mut HashSet::new();
    let data = gen_dataset_128();
    for val in data.iter() {
        s.insert(*val);
    }
    println!("Contains 1024? {}", s.contains(&1024));
}

fn main() {
    hashset_insertion_128m();
}