I like to make stuff work in Rust ๐ฆ.
I created following repos:
- projected-hash-map - implementation of projected hash map over hash set.
- rust-memory-analyzer - tool used to investigate memory usage in Rust code.
I constributed to, for example:
set reconciliation playground
License: Apache License 2.0
I like to make stuff work in Rust ๐ฆ.
I created following repos:
I constributed to, for example:
The following algorithm can be used to efficiently estimate the size of the difference between two sets:
Suppose that both peers sample their sets using the same predicate that selects an element with probability p. If the size of the symmetric difference between the sets is n, then the probability that the samples will be identical is (1-p)n. This probability roughly behaves as follows: if np >> 1, this probability is close to zero, if np << 1, it is close to one, otherwise it is somewhere in between.
This can be used to estimate the size of the difference like this: the peers choose a sequence of the values p, for example, 1/2i for some range of integers i. For each p, they sample the set multiple times using different predicates that select an element with probability p, compute the hash of each of the sampled sets, and send the hashes to the other peer. Now, each peer can compare their hashes with those of the other peer. For low p, most of the hashes will be identical. For high p, most of the hashes will probably be different. For some intermediate value of p, about half of the hashes will be different. The exact fraction can be used to estimate the size more precisely.
Some implementation notes:
This is what I found after a quick review:
In blt.rs:
DefaultHasher
, it doesn't guarantee consistency across program instances.if i != 0
on line 130 seems to be incorrect.generate_idx
) is suboptimal, it may be more efficient to derive the indices from a single (sufficiently long) hash value.count
, this will make the sketch smaller and the code a bit simpler, but add some computation overhead (which will be small with a properly chosen hash function).A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.