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

[WIP] add tidwall/btree support #1519

Closed
wants to merge 2 commits into from

Conversation

siddontang
Copy link
Contributor

Just an experiment. I tried to use tidwall/btree instead of origin google's, you can see that the perf result is promising. we can consider it in the near future.

go test -run=^$ -bench ^BenchmarkSortedRegions_
goos: darwin
goarch: amd64
pkg: github.com/tikv/client-go/v2/internal/locate
cpu: VirtualApple @ 2.50GHz

BenchmarkSortedRegions_SearchByKey/SearchByKey/Original-8         	 6363214	       189.0 ns/op
BenchmarkSortedRegions_SearchByKey/SearchByKey/V2-8               	 9601129	       124.4 ns/op
BenchmarkSortedRegions_ReplaceOrInsert/ReplaceOrInsert/Original-8 	 5168029	       230.7 ns/op
BenchmarkSortedRegions_ReplaceOrInsert/ReplaceOrInsert/V2-8       	 5801372	       207.6 ns/op
BenchmarkSortedRegions_AscendGreaterOrEqual/AscendGreaterOrEqual/Original-8         	  280526	      4251 ns/op
BenchmarkSortedRegions_AscendGreaterOrEqual/AscendGreaterOrEqual/V2-8               	  277137	      4249 ns/op

Signed-off-by: Siddon Tang <[email protected]>
@siddontang siddontang requested a review from cfzjywxk December 13, 2024 23:43
Copy link

ti-chi-bot bot commented Dec 13, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign brson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has signed the dco. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 13, 2024
Signed-off-by: Siddon Tang <[email protected]>
@siddontang siddontang closed this Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant