Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Conversation

@a180285
Copy link

@a180285 a180285 commented Dec 31, 2022

Base on issue #42

Cached stop index when iterating. And following is some benchmark compare result on my PC.

Benchmarck

  goos: windows
  pkg: github.com/google/btree
  cpu: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz

- without cache
+ after cache stopIndex

  goarch: amd64 go1.18
- BenchmarkAscendRangeG-4            14937             74071 ns/op
+ BenchmarkAscendRangeG-4            22119             55385 ns/op

- BenchmarkDescendRangeG-4           12909             92070 ns/op
+ BenchmarkDescendRangeG-4           15200             78136 ns/op

- BenchmarkAscendRange-4              9895            122200 ns/op
+ BenchmarkAscendRange-4             14628             81924 ns/op

  goarch: amd64 go1.17
- BenchmarkAscendRange-4             12496             94311 ns/op
+ BenchmarkAscendRange-4             17521             68965 ns/op

@google-cla
Copy link

google-cla bot commented Dec 31, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@a180285
Copy link
Author

a180285 commented Dec 31, 2022

@a180285
Copy link
Author

a180285 commented Jan 3, 2023

Hi @gconnell , could you help reviewing this merge request?

@a180285
Copy link
Author

a180285 commented Feb 2, 2023

@gconnell @gauntface can you help review this? thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant