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

perf: use bits.Len64 instead of bsr #129

Merged
merged 1 commit into from
Apr 13, 2022
Merged

Conversation

Hchenn
Copy link
Collaborator

@Hchenn Hchenn commented Apr 12, 2022

This PR want to solve issue #34 and #97 , And the Benchmark like:

goos: linux
goarch: amd64
pkg: github.com/bytedance/gopkg/lang/mcache
BenchmarkBsr_origin
BenchmarkBsr_origin-48     	643503000	         1.86 ns/op	       0 B/op	       0 allocs/op
BenchmarkBsr_bits
BenchmarkBsr_bits-48    	1000000000	         0.373 ns/op	       0 B/op	       0 allocs/op

lang/mcache/utils.go Outdated Show resolved Hide resolved
lang/mcache/utils_test.go Outdated Show resolved Hide resolved
Copy link
Member

@zhangyunhao116 zhangyunhao116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It would be nice if we could update the benchmark results, not a big deal, just curious about this.

@Hchenn Hchenn merged commit 65bf48f into bytedance:develop Apr 13, 2022
joway pushed a commit to joway/gopkg that referenced this pull request Apr 17, 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.

3 participants