gperf
C-dictionary
gperf | C-dictionary | |
---|---|---|
7 | 3 | |
2 | 5 | |
- | - | |
4.7 | 10.0 | |
about 2 months ago | about 1 year ago | |
C++ | C | |
GNU General Public License v3.0 only | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gperf
-
What is an example of non-linear static data structure and what is an accurate breakdown of ds types?
Can create a ton of theoretical examples, but even in practice we use such data structures. An example that first came to mind is gperf which generates static hash table data structure for predefined set of strings (So you cannot add or remove any elements).
-
Hashtables
gperf is a generator for perfect hash functions. Its documentation has a bibliography that might contain helpful links.
- Quickly checking that a string belongs to a small set
-
Generating the code for an efficient conditional tree to select from a list of strings
I think gperf is what you need. Alternatively cmph.
-
How to emulate map literals in C?
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.
- On implementing Bloom Filters in C
C-dictionary
- Generating the code for an efficient conditional tree to select from a list of strings
-
Since my first draft of dictionary got so much attentions here's version 2
Thank you for your feedback. As you mentioned it doesnt work with multiple arguments coz compiler simply doesnt push them. I fixed it by appending the function signature with right amount of arguments. https://github.com/Kw0rker/C-dictionary/commit/6ded674f7cc31997877c065b30b6c444e00db894
What are some alternatives?
parallel-hashmap - A family of header-only, very fast and memory-friendly hashmap and btree containers.
janet - A dynamic language and bytecode vm
meow_hash - Official version of the Meow hash, an extremely fast level 1 hash
metalang99 - Full-blown preprocessor metaprogramming
mph - (Fork) Minimal Perfect Hash
Muon - A Micro (1k lines of code) Unit Test Framework for C/C++
robin-hood-hashing - Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20
vmacro - Vim macros on the command line 🚀🤖
encoding - Go package containing implementations of efficient encoding, decoding, and validation APIs.
sourcery - 🧙 A simple but very fast recursive source code spell checker made in C
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.
asm - Go library providing algorithms optimized to leverage the characteristics of modern CPUs