Giter Site home page Giter Site logo

pachash's Introduction

PaCHash

An object store for variable-sized objects, which has small internal-memory space usage and still guarantees a limited number of external IO operations. For a given parameter a, the internal memory space usage is 2 + log(a) bits per block. Queries for objects of size |x| take constant time and fetch 1 + |x|/B + 1/a blocks from external memory.

Plots preview

Library usage

Add the following to your CMakeLists.txt.

add_subdirectory(path/to/PaCHash)
target_link_libraries(YourTarget PRIVATE PaCHash)

Building the examples

git clone --recursive [email protected]:ByteHamster/PaCHash.git
mkdir PaCHash/build
cd PaCHash/build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j

Benchmarks

Alternative methods are implemented for benchmarking. You can find the full benchmark scripts in an independent repository: https://github.com/ByteHamster/PaCHash-Experiments

Method External memory utilization Internal memory usage IOs per query
PaCHash 100% ~6 bits/page 1 (variable size)
Separator Hashing Up to 98%¹ ~6 bits/page 1
Cuckoo Hashing Up to 98%¹ Constant 2 parallel

¹ Depending on the input distribution. The methods are originally designed for fixed size objects. Adversarial input can therefore bring the utilization down to 51% or even make construction impossible.

License

This code is licensed under the GPLv3. If you use the project in an academic context or publication, please cite our paper:

@inproceedings{kurpicz2023pachash,
  author       = {Florian Kurpicz and
                  Hans{-}Peter Lehmann and
                  Peter Sanders},
  title        = {PaCHash: Packed and Compressed Hash Tables},
  booktitle    = {{ALENEX}},
  pages        = {162--175},
  publisher    = {{SIAM}},
  year         = {2023},
  doi          = {10.1137/1.9781611977561.CH14}
}

pachash's People

Contributors

bytehamster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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