Skip to content

storage/engine: micro-optimize MVCCKeyCompare#45462

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
petermattis:pmattis/mvcc-key-compare
Feb 26, 2020
Merged

storage/engine: micro-optimize MVCCKeyCompare#45462
craig[bot] merged 1 commit intocockroachdb:masterfrom
petermattis:pmattis/mvcc-key-compare

Conversation

@petermattis
Copy link
Copy Markdown
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
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Collaborator Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
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