Commits


liyafan82 authored and Micah Kornfield committed 95119a53fb8
ARROW-7216: [Java] Improve the performance of setting/clearing individual bits 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 Closes #5872 from liyafan82/fly_1120_clear and squashes the following commits: cb745b5bc <liyafan82> Discuss the reason for duplicate logic aec3b0462 <liyafan82> Use better method names 58b9735f8 <liyafan82> Improve the performance of setting/clearing individual bits Authored-by: liyafan82 <fan_li_ya@foxmail.com> Signed-off-by: Micah Kornfield <emkornfield@gmail.com>