uthash VS smol_world

Compare uthash vs smol_world and see what are their differences.

uthash

C macros for hash tables and more (by troydhanson)

smol_world

Compact garbage-collected heap and JSON-like object model (by snej)
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.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
uthash smol_world
4 3
3,936 80
- -
2.3 1.5
4 months ago 12 months ago
C C++
GNU General Public License v3.0 or later Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

uthash

Posts with mentions or reviews of uthash. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-13.

smol_world

Posts with mentions or reviews of smol_world. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-13.
  • A simple hash table in C
    7 projects | news.ycombinator.com | 13 Jun 2023
    Thank you for this article.

    I have been working on trying to design a contiguous hash table data structure that has these two mutual requirements:

    a) allows deep clones (due to contiguous memory copyable with memcpy)

    b) supports arbitrarily nestable hashmaps

    The closest library I know about is smolworld ( https://github.com/snej/smol_world ) but I don't know how easy it can be cloned.

    These requirements rules out multiple mallocs: I do one single malloc and expect that to be enough for the entire hashmap.

    I'm not sure if these constraints might also force a fixed number of buckets and a fixed capacity.

    The clonable property requires interior mutability be limited, because if you memcpy pointers they would cause structure sharing, that I'm trying to avoid, hence a deep clone.

    Rationale: these are the use cases I have for such a data structure. The first is cheap copy on write. I also have a left-right concurrency hashmap, but I feel the properties of this data structure are even better. The first is a sharding in multithreading design: do a cheap memcpy for each thread and shard the processing and merge at the end, without any synchronization cost while the threads are working. I know that deep cloning is slow in Java if you do it with loops rather than memcpy. Another use case is efficient serialization.

  • Smol_world: Compact garbage-collected heap and JSON-like object model
    1 project | news.ycombinator.com | 6 Feb 2023
    1 project | news.ycombinator.com | 5 Feb 2023

What are some alternatives?

When comparing uthash and smol_world you can also consider the following projects:

CVE-2022-27254 - PoC for vulnerability in Honda's Remote Keyless System(CVE-2022-27254)

sc - Common libraries and data structures for C.

frr - The FRRouting Protocol Suite

Klib - A standalone and lightweight C library

map - A type-safe hash map implementation for C

QEMU - Official QEMU mirror. Please see https://www.qemu.org/contribute/ for how to submit changes to QEMU. Pull Requests are ignored. Please only use release tarballs from the QEMU website.

ctl - My variant of the C Template Library

librdkafka - The Apache Kafka C/C++ library

swiss-table - C adaptation of the swiss table (flat hash map) presented at CppCon by Google (https://www.youtube.com/watch?v=ncHmEUmJZf4).