SaaSHub helps you find the best software and product alternatives Learn more →
Klib Alternatives
Similar projects and alternatives to Klib
-
-
AppSignal
Monitoring that respects your time & budget. APM, error tracking, and dashboards for modern web apps. Ten-minute setup, transparent flat pricing, and support from engineers who actually use the product.
-
-
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)
-
countwords
Discontinued Playing with counting word frequencies (and performance) in various languages.
-
parallel-hashmap
A family of header-only, very fast and memory-friendly hashmap and btree containers.
-
-
robin-hood-hashing
Discontinued Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
-
-
-
-
mlib
Library of generic and type safe containers in pure C language (C99 or C11) for a wide collection of container (comparable to the C++ STL).
-
-
-
-
-
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Klib discussion
Klib reviews and mentions
-
It's Alive! statgrab Returns After 20 Years
I shipped a 1.0.0 modernization this week. Rebuilt the storage on top of klib khash, got it green on PHP 7.4 through 8.5 NTS and ZTS, added a proper OO surface (LcHash with $obj[$key] dimension access), wrote a benchmark script and let it run.
- Factor is faster than Zig
- A simple hash table in C
-
So what's the best data structures and algorithms library for C?
It could be that the cost of the function calls, either directly or via a pointer, is drowned out by the cost of the one or more cache misses inevitably invoked with every hash table lookup. But I don't want to say too much before I've finished my benchmarking project and published the results. So let me just caution against laser-focusing on whether the comparator and hash function are/can be inlined. For example stb_ds uses a hardcoded hash function that presumably gets inlined, but in my benchmarking (again, I'll publish it here in coming weeks) shows it to be generally a poor performer (in comparison to not just CC, the current version of which doesn't necessarily inline those functions, but also STC, khash, and the C++ Robin Hood hash tables I tested).
-
Generic dynamic array in 60 lines of C
Not an entirely uncommon idea. I've written one.
There's also a well-known one here, in klib: https://github.com/attractivechaos/klib/blob/master/kvec.h
- C_dictionary: A simple dynamically typed and sized hashmap in C - feedback welcome
- Inside boost::unordered_flat_map
-
The New Ghostscript PDF Interpreter
Code reuse is achievable by (mis)using the preprocessor system. It is possible to build a somewhat usable API, even for intrusive data structures. (eg. the linux kernel and klib[1])
I do agree that generics are required for modern programming, but for some, the cost of complexity of modern languages (compared to C) and the importance of compatibility seem to outweigh the benefits.
[1]: http://attractivechaos.github.io/klib
- C LIBRARY
- boost::unordered map is a new king of data structures
-
A note from our sponsor - SaaSHub
www.saashub.com | 7 Oct 2026
Stats
attractivechaos/klib is an open source project licensed under MIT License which is an OSI approved license.
The primary programming language of Klib is C.