GithubHelp home page GithubHelp logo

mloy / hs_hash Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gatzka/hs_hash

0.0 1.0 0.0 11 KB

A C based implementation of a Hopscotch hash table

License: MIT License

C 91.65% CMake 8.35%

hs_hash's Introduction

hs_hash

A C based implementation of a Hopscotch hash table.

This is an C-based implementation of the hopscotch hashtable alrgorithm.

The implementation is focused to be used in small microcontroller based systems or the Linux kernel. Resizing of the hashmap is not implemented, so you can't change the size after declaring the hashtable.

One of the major advantages is that you can make HS_HASHTABLE_GET operations ans concurrently HS_HASHTABLE_REMOVE and HS_HASHTABLE_PUT operations, so the GET operation might be interrupted by PUT and/or REMOVE.

Three different key types are supported:

  • uint32_t
  • uint64_t
  • zero terminated strings (char *)

To avoid code duplication and because C has no template engine, the whole implementation is a basically a big macro. So don't expect good debug experience if you step into this code and be prepared for strange and nasty compiler warnings/errors if you don't use the hashtable correctly.

hs_hash's People

Contributors

gatzka avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.