All Projects → irfansharif → Cfilter

irfansharif / Cfilter

Licence: mit
Cuckoo Filter implementation in Go, better than Bloom Filters (unmaintained)

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Cfilter

Boomfilters
Probabilistic data structures for processing continuous, unbounded streams.
Stars: ✭ 1,333 (+72.67%)
Mutual labels:  bloom-filter, filter
raptor
A fast and space-efficient pre-filter for querying very large collections of nucleotide sequences.
Stars: ✭ 37 (-95.21%)
Mutual labels:  filter, bloom-filter
blex
Fast Bloom filter with concurrent accessibility, powered by :atomics module.
Stars: ✭ 34 (-95.6%)
Mutual labels:  filter, bloom-filter
Sieve
Sieve Script Editor
Stars: ✭ 452 (-41.45%)
Mutual labels:  filter
Polish Ads Filter
CertyficateIT - Oficjalne polskie filtry do Adblock, uBlock Origin, Adguard
Stars: ✭ 462 (-40.16%)
Mutual labels:  filter
Super Blur
Screen and UI gaussian blur for Unity
Stars: ✭ 543 (-29.66%)
Mutual labels:  filter
Nbstripout
strip output from Jupyter and IPython notebooks
Stars: ✭ 738 (-4.4%)
Mutual labels:  filter
Numpycnn
Building Convolutional Neural Networks From Scratch using NumPy
Stars: ✭ 436 (-43.52%)
Mutual labels:  filter
Khmer
In-memory nucleotide sequence k-mer counting, filtering, graph traversal and more
Stars: ✭ 640 (-17.1%)
Mutual labels:  bloom-filter
Performance Analysis Js
Map/Reduce/Filter/Find Vs For loop Vs For each Vs Lodash vs Ramda
Stars: ✭ 532 (-31.09%)
Mutual labels:  filter
Asyncro
⛵️ Beautiful Array utilities for ESnext async/await ~
Stars: ✭ 487 (-36.92%)
Mutual labels:  filter
Sloth
Mac app that shows all open files, directories, sockets, pipes and devices in use by all running processes. Nice GUI for lsof.
Stars: ✭ 4,549 (+489.25%)
Mutual labels:  filter
Sieve
⚗️ Clean & extensible Sorting, Filtering, and Pagination for ASP.NET Core
Stars: ✭ 560 (-27.46%)
Mutual labels:  filter
Pesdk Android Demo
A fully customizable photo editor for your app.
Stars: ✭ 464 (-39.9%)
Mutual labels:  filter
Bbmetalimage
A high performance Swift library for GPU-accelerated image/video processing based on Metal.
Stars: ✭ 677 (-12.31%)
Mutual labels:  filter
Videobeautify
With this APP, you can do all kinds of professional optimising and beautifying to your videos
Stars: ✭ 450 (-41.71%)
Mutual labels:  filter
Debugviewpp
DebugView++, collects, views, filters your application logs, and highlights information that is important to you!
Stars: ✭ 592 (-23.32%)
Mutual labels:  filter
Spotify Ad Free
A filter list to block all Spotify ads!
Stars: ✭ 479 (-37.95%)
Mutual labels:  filter
Mixitup
A high-performance, dependency-free library for animated filtering, sorting, insertion, removal and more
Stars: ✭ 4,431 (+473.96%)
Mutual labels:  filter
Filterizr
✨ Filterizr is a JavaScript library that sorts, shuffles and filters responsive galleries using CSS3 transitions ✨
Stars: ✭ 546 (-29.27%)
Mutual labels:  filter

cfilter: Cuckoo Filter implementation in Go

GoDoc Build Status Coverage Status Go Report Card

Cuckoo filter is a Bloom filter replacement for approximated set-membership queries. Cuckoo filters support adding and removing items dynamically while achieving even higher performance than Bloom filters. For applications that store many items and target moderately low false positive rates, cuckoo filters have lower space overhead than space-optimized Bloom filters. Some possible use-cases that depend on approximated set-membership queries would be databases, caches, routers, and storage systems where it is used to decide if a given item is in a (usually large) set, with some small false positive probability. Alternatively, given it is designed to be a viable replacement to Bloom filters, it can also be used to reduce the space required in probabilistic routing tables, speed longest-prefix matching for IP addresses, improve network state management and monitoring, and encode multicast forwarding information in packets, among many other applications.

Cuckoo filters provide the flexibility to add and remove items dynamically. A cuckoo filter is based on cuckoo hashing (and therefore named as cuckoo filter). It is essentially a cuckoo hash table storing each key's fingerprint. Cuckoo hash tables can be highly compact, thus a cuckoo filter could use less space than conventional Bloom filters, for applications that require low false positive rates (< 3%).

For details about the algorithm and citations please refer to the original research paper, "Cuckoo Filter: Better Than Bloom" by Bin Fan, Dave Andersen and Michael Kaminsky.

Interface

A cuckoo filter supports following operations:

  • Insert(item): insert an item to the filter
  • Lookup(item): return if item is already in the filter (may return false positive results like Bloom filters)
  • Delete(item): delete the given item from the filter. Note that to use this method, it must be ensured that this item is in the filter (e.g., based on records on external storage); otherwise, a false item may be deleted.
  • Count(): return the total number of items currently in the filter

Example Usage

import "github.com/irfansharif/cfilter"

cf := cfilter.New()

// inserts 'buongiorno' to the filter
cf.Insert([]byte("buongiorno"))

// looks up 'hola' in the filter, may return false positive
cf.Lookup([]byte("hola"))

// returns 1 (given only 'buongiorno' was added)
cf.Count()

// tries deleting 'bonjour' from filter, may delete another element
// this could occur when another byte slice with the same fingerprint
// as another is 'deleted'
cf.Delete([]byte("bonjour"))

This repository was featured on Hacker News, front page (discussion here). Another implementation in Go can be found at seiflotfy/cuckoofilter and is where I borrowed the ideas for my tests, notably TestMultipleInsertions. The original implementation in C++ by the authors of the research paper can be found at efficient/cuckoofilter.

Author

Irfan Sharif: [email protected], @irfansharifm

License

cfilter source code is available under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].