MCPcopy Create free account
hub / github.com/cosdata/cosdata / main

Function main

org/src/performant_fixed_set.rs:103–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101}
102
103fn main() {
104 let total_elements = 5000;
105
106 // Insertion Benchmarks
107 let fixed_set_insert_time = benchmark_insert(total_elements);
108 let hashset_insert_time = benchmark_hashset_insert(total_elements);
109
110 // Lookup Benchmarks
111 let (fixed_set_lookup_time, fixed_set_lookups) = benchmark_lookup(total_elements);
112 let (hashset_lookup_time, hashset_lookups) = benchmark_hashset_lookup(total_elements);
113
114 println!("Benchmark Results for {} elements:", total_elements);
115 println!("FixedSet Insertion Time: {:?}", fixed_set_insert_time);
116 println!("HashSet Insertion Time: {:?}", hashset_insert_time);
117 println!("FixedSet Lookup Time: {:?}", fixed_set_lookup_time);
118 println!("HashSet Lookup Time: {:?}", hashset_lookup_time);
119 println!("FixedSet Lookups: {}", fixed_set_lookups);
120 println!("HashSet Lookups: {}", hashset_lookups);
121}

Callers

nothing calls this directly

Calls 4

benchmark_insertFunction · 0.85
benchmark_hashset_insertFunction · 0.85
benchmark_lookupFunction · 0.85
benchmark_hashset_lookupFunction · 0.85

Tested by

no test coverage detected