Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toffaletti/zig-array-map
ArrayMap data structure for Zig
https://github.com/toffaletti/zig-array-map
zig
Last synced: 14 days ago
JSON representation
ArrayMap data structure for Zig
- Host: GitHub
- URL: https://github.com/toffaletti/zig-array-map
- Owner: toffaletti
- License: mit
- Created: 2021-06-06T01:45:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-22T05:19:09.000Z (almost 3 years ago)
- Last Synced: 2024-07-30T21:09:05.535Z (3 months ago)
- Topics: zig
- Language: Zig
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zig ArrayMap
ArrayMap is a data structure that maps keys to values using an array of entries, optionally kept sorted by key. The contiguous layout in memory is cache friendly and can make ArrayMap a good choice for small amounts of data or data that is already sorted, written infrequently, but read many times.
```
┌┬────────────┬┬────────────┬┬────────────┬~
││ Entry ││ Entry ││ Entry │~
│├────┬┬──────┤├────┬┬──────┤├────┬┬──────┤~
││Key ││Value ││Key ││Value ││Key ││Value │~
└┴────┴┴──────┴┴────┴┴──────┴┴────┴┴──────┴~
```