https://github.com/squeek502/zig-hash-map-bench
Benchmarks for Zig's std.HashMap
https://github.com/squeek502/zig-hash-map-bench
benchmark hash-map zig
Last synced: 6 months ago
JSON representation
Benchmarks for Zig's std.HashMap
- Host: GitHub
- URL: https://github.com/squeek502/zig-hash-map-bench
- Owner: squeek502
- License: unlicense
- Created: 2019-06-06T06:19:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-15T09:30:47.000Z (over 1 year ago)
- Last Synced: 2024-10-15T20:06:27.129Z (7 months ago)
- Topics: benchmark, hash-map, zig
- Language: Zig
- Size: 4.88 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zig-hash-map-bench
Benchmarks for [Zig](https://ziglang.org)'s `std.HashMap`. Will be expanded on in the future.
Based loosely on some of the benchmarking of C++ hash map implementations here:
- https://probablydance.com/2017/02/26/i-wrote-the-fastest-hashtable/
- https://tessil.github.io/2016/08/29/benchmark-hopscotch-map.html
- https://martin.ankerl.com/2019/04/01/hashmap-benchmarks-01-overview/
- https://github.com/ktprime/emhash#other-benchmark## Running
Insertion without ensureCapacity:
```
zig run insert.zig -OReleaseFast -lc
``````
zig run insert-strings.zig -OReleaseFast -lc
```Output will be in the format:
```
num_elements,nanoseconds_per_element
1,68
2,40
3,32
5,25
7,21
10,19
...
```