GitXplorerGitXplorer
l

hyperminhash

public
9 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
4926749ee5204df7fb5d37a40fc80d981e1f6a70

Bump edition

llukaslueg committed a year ago
Unverified
b6be9b3a053f24327358fd05fd898c69de92b027

Switch travis to gh-actions

llukaslueg committed a year ago
Unverified
1ed1c20f02312756da5b5744ab8fa67c52d8fc34

Use xxhash-rust instead of metrohash internally, update dependencies

llukaslueg committed a year ago
Verified
b85aae63865aba181d4e3a5aea589606f0858472

Update README.md

llukaslueg committed 6 years ago
Unverified
4f6040a27d841456901dd09b4726cef37ccf77c8

Use memchr in parallel-example

llukaslueg committed 6 years ago
Unverified
043c699531febe71c796201902811cb28b446b7c

Update parallel-example

llukaslueg committed 6 years ago

README

The README file for this repository.

Hyperminhash for Rust

Crates.io Version Docs

A straight port of Hyperminhash for Rust. Very fast, constant memory-footprint cardinality approximation, including intersection and union operation.

use std::{io, io::Bufread, fs};

let reader = io::BufReader::new(fs::File::open(fname)?).lines();
let sketch = reader.collect::<io::Result<hyperminhash::Sketch>>()?;
println!("{}", sketch.cardinality());

Two files of 10,000,000 random strings each:

Operation Runtime Result
Cardinality via sort strings1.txt | uniq | wc -l 13.57 secs 9,774,970
Union via cat strings1.txt string2.txt | sort | uniq | wc -l 84.4 secs 19,122,087
Intersection via comm -12 <(sort string1.txt) <(sort strings2.txt) | wc -l 25.3 secs 428,370
Cardinality via Hyperminhash 0.69 secs 9,861,113
Cardinality via Hyperminhash (multithreaded) 0.15 secs 9,971,928
Union via Hyperminhash 1.59 secs 19,042,941
Intersection via Hyperminhash 1.52 secs 430,977