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

storage/engine: micro-optimize MVCCKeyCompare #45462

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

petermattis
Copy link
Collaborator

MVCCKeyCompare is the single largest CPU usage function in a
tpccbench test. So give it a bit of micro-optimization love. While
we're here, move this function next to the rest of the Pebble code as
that is the main user.

name old time/op new time/op delta
MVCCKeyCompare-16 15.8ns ± 4% 9.1ns ± 1% -42.57% (p=0.000 n=10+10)

Release note: None

`MVCCKeyCompare` is the single largest CPU usage function in a
`tpccbench` test. So give it a bit of micro-optimization love. While
we're here, move this function next to the rest of the Pebble code as
that is the main user.

name               old time/op  new time/op  delta
MVCCKeyCompare-16  15.8ns ± 4%   9.1ns ± 1%  -42.57%  (p=0.000 n=10+10)

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @sumeerbhola)

@petermattis
Copy link
Collaborator Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 26, 2020

Build succeeded

@craig craig bot merged commit 13c971c into cockroachdb:master Feb 26, 2020
@petermattis petermattis deleted the pmattis/mvcc-key-compare branch February 26, 2020 21:06
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