garypen / deduplicate Goto Github PK
View Code? Open in Web Editor NEWasynchronous deduplicator with optional LRU caching
License: Apache License 2.0
asynchronous deduplicator with optional LRU caching
License: Apache License 2.0
Hi. First of all, thank you for trying out moka in early days in Apollo Router. I wish you all the best with deduplicate!
I was quite surprised with the moka results. The performance didn't seem to improve when I varied the size of the cache.
...
It's also possible that I've not written my benchmarking code correctly, but I've tried to be consistent between the two crates, so please let me know if you spot any errors I can correct.
Actually, I spotted an error in your benchmarking code. I will create a pull request with the fix and some other enhancements.
In the PR, I did the followings:
get_text()
in every iterations.
get_text()
is called in every iterations even though the key already exists.let words = get_text();
into the async
block fixes the error.
cache.sync()
in every iterations to process pending eviction.
get
calls in both benchmarks.
get
calls will cause skews in the hit ratio.get
calls should be the same for both caches.
get
calls can be different for each run.hit_count
/ get_count
) in moka benchmark.
64
, 128
and 256
to reduce the hit ratio.
1024
(hit ratio is ~65% in my env).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.