sc VS ht

Compare sc vs ht and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
sc ht
17 1
2,163 9
- -
6.3 0.0
18 days ago over 13 years ago
C C
BSD 3-clause "New" or "Revised" License -
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.

sc

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

ht

Posts with mentions or reviews of ht. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-03-26.
  • How to implement a hash table (in C)
    4 projects | news.ycombinator.com | 26 Mar 2021
    > When the hash table gets too full, we need to allocate a larger array and move the items over. This is absolutely required when the number of items in the hash table has reached the size of the array, but usually you want to do it when the table is half or three-quarters full.

    Yes, but how you resize is important too: if you have a threshold size (like 3/4 full) at which you block and re-distribute all elements into a new array, you will incur a significant pause when this happens, e.g. https://log.kv.io/post/2009/05/15/leaky-hashtables

    Instead, when you reach the threshold amount you can create the new array and then gradually migrate the keys in small batches either with each operation or with a background thread. So on `get` if we're in the process of resizing: first check the new table, then the old one, and before returning migrate N keys from the old table to the new one. Free the old array once all the keys are migrated.

    I wrote a small hash table implementation with gradual re-hashing a while back, search for DICT_MAX_LOAD and dict_rehash here: https://github.com/nicolasff/ht/blob/master/dict.c#L193

What are some alternatives?

When comparing sc and ht you can also consider the following projects:

frr - The FRRouting Protocol Suite

wazero - wazero: the zero dependency WebAssembly runtime for Go developers

chibicc - A small C compiler

stage0 - A set of minimal dependency bootstrap binaries

pottery - Pottery - A container and algorithm template library in C

libderp - C collections. Easy to build, boring algorithms. Dumb is good.

gcc

uthash - C macros for hash tables and more

rizin - UNIX-like reverse engineering framework and command-line toolset.

webfsd - A simple HTTP server for mostly static content written in C

Fortress-of-Solitude - This Library has resources to solve common data structure algorithm problems like a Doubly linked list, Generic trees, Queue, Stack, and other algorithms. Each lib has an option to carry your custom data in elements. Custom data in detail, other fantastic resources.

live-bootstrap - Use of a Linux initramfs to fully automate the bootstrapping process