-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Make AbstractRowBlock#copyPositions branchless #12926
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
Make AbstractRowBlock#copyPositions branchless #12926
Conversation
raunaqmorarka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
core/trino-spi/src/test/java/io/trino/spi/block/BenchmarkCopyPositions.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/test/java/io/trino/spi/block/BenchmarkCopyPositions.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/test/java/io/trino/spi/block/BenchmarkCopyPositions.java
Outdated
Show resolved
Hide resolved
7056be1 to
b21dbda
Compare
Benchmark nullsAllowed selectedPositions selectedPositionsCount type baseline branchless branchless% BenchmarkCopyPositions.copyPositions FALSE GROUPED 200 ROW(BIGINT) 0.484 0.484 0 BenchmarkCopyPositions.copyPositions FALSE GROUPED 1000 ROW(BIGINT) 2.082 2.083 0.04803073967 BenchmarkCopyPositions.copyPositions FALSE GROUPED 8000 ROW(BIGINT) 18.698 18.893 1.042892288 BenchmarkCopyPositions.copyPositions FALSE SEQUENCE 200 ROW(BIGINT) 0.484 0.492 1.652892562 BenchmarkCopyPositions.copyPositions FALSE SEQUENCE 1000 ROW(BIGINT) 2.097 2.102 0.2384358608 BenchmarkCopyPositions.copyPositions FALSE SEQUENCE 8000 ROW(BIGINT) 18.881 18.914 0.1747788782 BenchmarkCopyPositions.copyPositions FALSE RANDOM 200 ROW(BIGINT) 0.489 0.492 0.6134969325 BenchmarkCopyPositions.copyPositions FALSE RANDOM 1000 ROW(BIGINT) 2.181 2.145 -1.650618982 BenchmarkCopyPositions.copyPositions FALSE RANDOM 8000 ROW(BIGINT) 21.12 20.017 -5.222537879 BenchmarkCopyPositions.copyPositions TRUE GROUPED 200 ROW(BIGINT) 0.862 0.894 3.712296984 BenchmarkCopyPositions.copyPositions TRUE GROUPED 1000 ROW(BIGINT) 3.968 4.005 0.9324596774 BenchmarkCopyPositions.copyPositions TRUE GROUPED 8000 ROW(BIGINT) 41.909 27.061 -35.4291441 BenchmarkCopyPositions.copyPositions TRUE SEQUENCE 200 ROW(BIGINT) 0.902 0.94 4.21286031 BenchmarkCopyPositions.copyPositions TRUE SEQUENCE 1000 ROW(BIGINT) 4.389 4.174 -4.898610162 BenchmarkCopyPositions.copyPositions TRUE SEQUENCE 8000 ROW(BIGINT) 41.143 28.406 -30.95787862 BenchmarkCopyPositions.copyPositions TRUE RANDOM 200 ROW(BIGINT) 0.9 0.927 3 BenchmarkCopyPositions.copyPositions TRUE RANDOM 1000 ROW(BIGINT) 4.556 4.17 -8.472344162 BenchmarkCopyPositions.copyPositions TRUE RANDOM 8000 ROW(BIGINT) 41.507 29.262 -29.50104802
b21dbda to
dfa8df4
Compare
|
@lukasz-stec, please include the error bars whenever showing benchmark results. It's important to understand the variance to see if the results are significant. |
|
Congrats @raunaqmorarka on your first merge! 🎉 |
sure, full jmh results for future reference below |
Description
Make AbstractRowBlock#copyPositions branchless to avoid branch misprediction penalties
JMH benchmarks
improvement
core query engine
Improve read performance with ROW data types
Related issues, pull requests, and links
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) Release notes entries required with the following suggested text: