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

Replace built-in map implemetnation to SwissTable #31

Closed
wants to merge 2 commits into from

Conversation

scalalang2
Copy link
Owner

resolve #28

benchmark

goos: linux
goarch: amd64
pkg: github.com/scalalang2/golang-fifo
cpu: Intel(R) Core(TM) i5-10600KF CPU @ 4.10GHz
                                 │     old      │                 new                  │
                                 │    sec/op    │    sec/op     vs base                │
Cache/cache=sieve/t=int32-12       398.0n ± 15%   464.1n ± 15%  +16.61% (p=0.019 n=10)
Cache/cache=sieve/t=int64-12       420.5n ±  4%   450.6n ± 15%        ~ (p=0.089 n=10)
Cache/cache=sieve/t=string-12      556.1n ±  5%   521.4n ±  8%   -6.23% (p=0.029 n=10)
Cache/cache=sieve/t=composite-12   719.1n ±  9%   615.0n ±  8%  -14.46% (p=0.000 n=10)
geomean                            508.6n         508.9n         +0.05%

                                 │    old     │                new                │
                                 │    B/op    │    B/op     vs base               │
Cache/cache=sieve/t=int32-12       148.0 ± 1%   144.0 ± 0%  -2.70% (p=0.000 n=10)
Cache/cache=sieve/t=int64-12       157.5 ± 0%   152.0 ± 1%  -3.49% (p=0.000 n=10)
Cache/cache=sieve/t=string-12      186.0 ± 1%   177.0 ± 0%  -4.84% (p=0.000 n=10)
Cache/cache=sieve/t=composite-12   225.0 ± 0%   210.0 ± 0%  -6.67% (p=0.000 n=10)
geomean                            176.7        168.9       -4.44%

                                 │    old     │                 new                  │
                                 │ allocs/op  │ allocs/op   vs base                  │
Cache/cache=sieve/t=int32-12       4.000 ± 0%   3.000 ± 0%  -25.00% (p=0.000 n=10)
Cache/cache=sieve/t=int64-12       4.000 ± 0%   3.000 ± 0%  -25.00% (p=0.000 n=10)
Cache/cache=sieve/t=string-12      4.000 ± 0%   4.000 ± 0%        ~ (p=1.000 n=10) ¹
Cache/cache=sieve/t=composite-12   4.000 ± 0%   4.000 ± 0%        ~ (p=1.000 n=10) ¹
geomean                            4.000        3.464       -13.40%

@scalalang2 scalalang2 closed this Jun 2, 2024
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.

Replace built-in hash map to Swiss Table
1 participant