Giter VIP home page Giter VIP logo

map's Introduction

A C implementation of an open-addressing hash map using Robin Hood linear probing and true deletion.

Many open-addressing hash maps implement lazy deletion using tombstones, although this can have rough performance characteristics when many deletions occur. True deletion can reduce probe lengths by searching for greater-displaced slots to fill deleted slots. Robin Hood linear probing can reduce the variance of probe lengths by evicting lesser-displaced slots during insertion.

There are multiple advantages to using true deletion and Robin Hood linear probing together. Both require the probe length to be stored per slot, so the space overhead of using one is the same as of using both. Searches may terminate when a slot's probe length is less than the current search probe length, not only when an empty slot is encountered. Deletion may shift every displaced slot after the deleted slot to the previous slot until a non-displaced or empty slot is encountered, instead of the continuously searching for eligible slots to fill deleted slots until an empty slot is encountered.

Reference:

On Deletions in Open Addressing Hashing
Rosa M. Jiménez, Conrado Martínez
https://epubs.siam.org/doi/10.1137/1.9781611975062.3

map's People

Contributors

orogenic 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.