Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add freelru to gc overhead comparison #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rockdaboot
Copy link
Contributor

This PR adds FreeLRU to the GC overhead comparison.
FreeLRU is a GC-less and fast "exact" HashMap LRU implementation.

The PR is applied on top of #19, so bette rget that in first and I'll do a rebase then.

Results

$ go run caches_gc_overhead_comparison.go -cache freelru
Cache:              freelru
Number of entries:  20000000
Number of repeats:  50
Value size:         100
GC pause for startup:  165.204µs
GC pause for freelru: 1.464987ms

This change generates the keys and values in advance.
This means the measurements of the GC impact of the cache algorithms
is no longer tainted by key/value creation, which comes with a lot of
heap allocations.
@rockdaboot rockdaboot force-pushed the add-freelru-to-gc-overhead-comparison branch from 95a1100 to 1dd118e Compare January 8, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant