3 ms·
This is really not a "standalone and lightweight glib", this is a generic data structure library in C, and it's quite blatantly obvious they're designed for dif
by awalton 12y ago
This is really not a "standalone and lightweight glib", this is a generic data structure library in C, and it's quite blatantly obvious they're designed for different purposes.
glib is a platform and portability library that evolved away from gtk+, with the goal being to make event driven programming simpler, both for system daemons and Gtk+ applications. Most of glib's data structures are highly unoptimized simply because they don't need to run in critical paths of whatever applications they're used in; optimizing would be mostly premature (with some caveats; GSequence was added because of the need for a higher performance list-like container , GHashTable got a lot of love a few years ago because it turned out to be awful, etc). glib is ABI stable(-ish).
klib is written for doing data analysis and serialization in C, with two releases in four years and no stability claims.
The two can co-exist quite nicely - I can easily see a glib application using klib data structures along critical paths.
- stormbrew 12y agoI'm surprised the title hasn't been changed. The actual website says "generic lib" and at no point does it draw a direct comparison with glib. Usually these things are changed much faster.