Giter VIP home page Giter VIP logo

adaptiveqf's Introduction

cqf

Adaptive Quotient Filter (AQF)

Overview

The AQF supports approximate membership testing and counting the occurrences of items in a data set. Like other AMQs, the AQF has a chance for false positives during queries. However, the AQF has the ability to adapt to false positives after they have occurred so they are not repeated. At the same time, the AQF maintains the benefits of a quotient filter, as it is small and fast, has good locality of reference, scales out of RAM to SSD, and supports deletions, counting, resizing, merging, and highly concurrent access.

API

  • 'qf_insert_ret(item, count)': insert an item to the filter. Returns 0 if the item to insert shares a fingerprint with an existing item in the filter.
  • 'insert_and_extend(item, count, other)': insert an item and extend it. Should be called after qf_insert_ret returns 0, where other is the key of the previously inserted item which caused qf_insert_ret to return 0. If item and other are equal, this updates the count for the item in the filter.
  • 'qf_query(item)': return the count of the item. Note that this method may return false positive results like Bloom filters or an over count.
  • 'qf_remove(item)': remove the item from the filter
  • 'qf_adapt(item, other)': extend the item in the filter. Afterwards, other is guaranteed to not be a false positive query unless the two items are identical.

Build

This library depends on libssl.

The code uses two new instructions to implement select on machine words introduced in intel's Haswell line of CPUs. However, there is also an alternate implementation of select on machine words to work on CPUs older than Haswell.

To build on a Haswell or newer hardware:

 $ make test
 $ ./test

To build on an older hardare (older than Haswell):

 $ make NH=1 test
 $ ./test

Contributing

Contributions via GitHub pull requests are welcome.

Authors

adaptiveqf's People

Contributors

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