Giter Site home page Giter Site logo

tomereven / pocket_dictionary Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 18.79 MB

Compact cache-friendly filter, for small number of elements.

License: Apache License 2.0

CMake 0.49% C++ 89.06% C 0.27% Python 10.18%
bloom-filter bloomfilter bloom counting-bloom-filter filter approximate-membership-query amq

pocket_dictionary's Introduction

Pocket_Dictionary

@misc{bercea2019fullydynamic,
    title={Fully-Dynamic Space-Efficient Dictionaries and Filters with Constant Number of Memory Accesses},
    author={Ioana O. Bercea and Guy Even},
    year={2019},
    eprint={1911.05060},
    archivePrefix={arXiv},
    primaryClass={cs.DS}
}

See https://arxiv.org/pdf/1911.05060.pdf page 12, for pd single page explanation on Pocket Dictionary, that is self-contained, and includes drawings.

How to install and compile

git clone https://github.com/TomerEven/Pocket_Dictionary.git
cd Pocket_Dictionary/Filter_PD
mkdir build_dir
cd build_dir
cmake ..
make

How to run

In build_dir directory

  • There are 3 types of benchmarking for PD based filter:
./Filter_PD <type>
./Filter_PD <type> <max number of elements> <error probability exponent> <number of lookup to preform>
./Filter_PD <type> <max number of elements> <error probability exponent> <number of lookup to preform> <first level counter size> <second level counter size> <first level load factor> <second level load factor> 
  • type: 0 or 1.
    0 is for pd filter based on Pocket Dictionary.
    1 is for pd filter based on counting PD (CPD)

  • max number of elements: The max number of distinct elements the filter is supposed to contain in any time. This effects the space usage.

  • error probability exponent: Set the probability the filter will err (False positive), to be 2^error probability exponent

  • number of lookup to preform: Number of random lookups that will preformed.

  • first level counter size: Number of bits each counter in the CPD has.

  • second level counter size: Number of bits each counter in the counter hash table. Also maximal number of repetition each element can have.

  • first level load factor: In average, how loaded should each PD be.

  • second level load factor: Sets the hash table size.

Benchmarking

Comparing filters for benchmarks.

pocket_dictionary's People

Contributors

jbapple avatar theholyjoker avatar tomereven avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.