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

mvcc: don't allocate keys when computing Revisions #8475

Merged
merged 2 commits into from
Aug 31, 2017

Conversation

heyitsanthony
Copy link
Contributor

~6% improvement

Before:

$ go test -bench=RangeKey100 -run=RangeKey100 -v  -count=4
BenchmarkStoreRangeKey100-8        10000            118881 ns/op           46240 B/op        723 allocs/op
BenchmarkStoreRangeKey100-8        10000            117498 ns/op           46241 B/op        724 allocs/op
BenchmarkStoreRangeKey100-8        10000            119148 ns/op           46241 B/op        724 allocs/op
BenchmarkStoreRangeKey100-8        10000            116682 ns/op           46241 B/op        724 allocs/op

After:

BenchmarkStoreRangeKey100-8        10000            111767 ns/op           40113 B/op        716 allocs/op
BenchmarkStoreRangeKey100-8        10000            110846 ns/op           40112 B/op        715 allocs/op
BenchmarkStoreRangeKey100-8        10000            111666 ns/op           40112 B/op        715 allocs/op
BenchmarkStoreRangeKey100-8        10000            111672 ns/op           40113 B/op        716 allocs/op

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm. thanks!

@heyitsanthony heyitsanthony merged commit b61c748 into etcd-io:master Aug 31, 2017
@heyitsanthony heyitsanthony deleted the mvcc-100-range branch August 31, 2017 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants