63

GitHub - TheTannerRyan/ring: Package ring provides a high performance and thread...

 5 years ago
source link: https://github.com/TheTannerRyan/ring
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

ring - high performance bloom filter

Build Status Go Report Card GoDoc GitHub license

Package ring provides a high performance and thread safe Go implementation of a bloom filter.

Usage

Please see the godoc for usage.

Accuracy

Running make will perform unit tests, comparing the target false positive rate with the actual rate. Here is a test against 1 million elements with a targeted false positive rate of 0.1%. Tests fail if the number of false positives exceeds the target.

=== RUN   TestBadParameters
--- PASS: TestBadParameters (0.00s)
=== RUN   TestReset
--- PASS: TestReset (0.36s)
=== RUN   TestData
--- PASS: TestData (9.45s)
PASS
>> Number of elements:  1000000
>> Target false positive rate:  0.001000
>> Number of false positives:  110
>> Actual false positive rate:  0.000110
>> Benchmark Add():   5000000          284 ns/op
>> Benchmark Test():  10000000         209 ns/op
ok      command-line-arguments  13.849s

License

Copyright (c) 2019 Tanner Ryan. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK