Our great sponsors
-
STC
A modern, user friendly, generic, type-safe and fast C99 container library: String, Vector, Sorted and Unordered Map and Set, Deque, Forward List, Smart Pointers, Bitset and Random numbers. (by stclib)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Probably a function with a switch statement if the map is small. Otherwise, with my STC lib, you can do:
u/N-R-K followed up with a neat Robin Hood hash that's been merged into nnn.
Adding to this, there are tools such as gperf which are specifically designed for this. Apparently gperf works well for smaller number of keys but not for really high n (> 100,000 ish) and mph apparently works better for larger n.
Related posts
- Directory navigation on Helix
- Help compiling a package with a compiler flag from an official Debian source
- How do I change default image and video interpreter program through environment variables for nnn file manager ? (Asking herre bc r/linuxquestions doesnt allow posts)
- Can't figure out how to change icon theme in nnn
- [Command Line] Quel gestionnaire de fichiers préférez-vous dans la CLI?