ht

A simple hash table with non-blocking resize (by nicolasff)

Ht Alternatives

Similar projects and alternatives to ht

  • CPython

    1,313 ht VS CPython

    The Python programming language

  • Redis

    318 ht VS Redis

    Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • sc

    17 ht VS sc

    Common libraries and data structures for C.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better ht alternative or higher similarity.

ht reviews and mentions

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

Stats

Basic ht repo stats
1
9
0.0
over 13 years ago

The primary programming language of ht is C.

Popular Comparisons


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com