docs / benchmarks / collection
Benchmarks index
aot
codec
codec / csv
codec / json
collection
- Overview
- ArrayList
- BPlusTree
- Cache
- Collectors
- HashMap
- HashSet
- Heap
- ImmutableList
- ImmutableMap
- ImmutableSet
- LinkedList
- RedBlackTree
- Sort
collection / ltm
concurrent
gfx
hash
http
io
io / file
io / net
io / net / uri
lang
- Overview
- Allocation and ownership
- Calls and dispatch
- Exceptions
- Guid
- Loops
- Math and SIMD
- Optional
- Pair
- Slice
- String
- StringBuilder
- Whole programs: the Benchmarks Game
lang / stream
llm
math
math / fft
math / linalg
math / npio
math / poly
math / random
math / stats
ml
nucleo
primavera
process
reflect
search
search / distance
search / fuzzy
search / ngram
time
toolchain
toolchain / kernel-startup
wire
xpu
xpu / mesh
HashMap
cajeta.collection.HashMap — the SwissTable-backed map over a dense entry array. Integer and string keys are measured separately because the string rows pay for hashing and comparison and the integer rows do not; the methodology follows Martin Ankerl’s hashmap suite.
Benchmarks
| id | workload | against | check |
|---|---|---|---|
collection/hashmap-int | insert 1e6 int64 keys, then look each up | C++ unordered_map and unordered_dense, Rust HashMap and hashbrown, Go map, Java HashMap, Python dict | sum of values |
collection/hashmap-string | insert 1e6 16-byte string keys, then look each up | same | sum |
collection/hashmap-lookup-hit | 1e7 lookups that hit, 1e6-entry map | same | sum |
collection/hashmap-lookup-miss | 1e7 lookups that miss | same | miss count |
collection/hashmap-iterate | iterate a 1e6-entry map 10 times | same | sum |
Results
One chart per benchmark, for the machine selected at the top of the page. Languages are the bars, best first; Cajeta’s bar is in color and the competitors’ are gray. A skipped competitor keeps its row with the reason in place of a bar. A benchmark with no row on the selected machine says so and shows nothing else.
Not yet measured on Proton.
Not yet measured on Proton.
Not yet measured on Proton.
Not yet measured on Proton.
Not yet measured on Proton.
Reproduce
cd bench
./bench.sh --bench hashmap-int # Cajeta
./bench.sh --bench hashmap-int --competitors # every pinned competitor
Every row records the compiler and competitor versions, flags, machine, OS and driver; METHODOLOGY states the rules a number must satisfy before it is published.
See also
- Reference: HashMap
- Source:
runtime/src/cajeta/collection/HashMap.cajeta - Benchmark source:
bench/src/main/cajeta/bench/collection/