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

[Java] Improve the performance of setting/clearing individual bits #23512

Closed
asfimport opened this issue Nov 20, 2019 · 1 comment
Closed

[Java] Improve the performance of setting/clearing individual bits #23512

asfimport opened this issue Nov 20, 2019 · 1 comment

Comments

@asfimport
Copy link

Setting/clearing individual bits are key operations for Arrow. In this issue, we improve the performance these operations by:

  1. replacing arithmetic operations with bit-wise operations
  2. remove unnecessary casts between int/byte
  3. provide new API to remove the if branch

Benchmark results show that for clearing a bit, the performance improve by 11%, and for general set/clear operation, the performance improve by 4.7%:

before:
BitVectorHelperBenchmarks.setValidityBitBenchmark avgt 5 4.524 ± 0.015 us/op

after:
BitVectorHelperBenchmarks.setValidityBitBenchmark avgt 5 4.313 ± 0.011 us/op
BitVectorHelperBenchmarks.setValidityBitToZeroBenchmark avgt 5 4.020 ± 0.016 us/op

Reporter: Liya Fan / @liyafan82
Assignee: Liya Fan / @liyafan82

PRs and other links:

Note: This issue was originally created as ARROW-7216. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Micah Kornfield / @emkornfield:
Issue resolved by pull request 5872
#5872

@asfimport asfimport added this to the 0.16.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants