ARROW-5752: [Java] Improve the performance of ArrowBuf#setZero#4715
ARROW-5752: [Java] Improve the performance of ArrowBuf#setZero#4715liyafan82 wants to merge 1 commit into
Conversation
|
LGTM, @praveenbingo @pravindra any concerns? |
|
LGTM. I am just curious what the native operation does? I mean does it not write word by word? |
The native code also writes data word by word. However, the performance of native code is higher. |
|
@liyafan82 failure looks unrelated but I would like to make sure this doesn't affect gandiva in some way, could you retry? |
|
Nice one. thanks for fixing this ! |
i retriggered the build, it finished successfully. |
|
merging |
@pravindra thanks a lot for your effort. |
The current implementation involves repeated calls of setLong, setInt & setByte. It is more efficient to directly call the native function. Performance improve by 4.8x before: ArrowBufBenchmarks.setZero avgt 5 319616.675 ± 918.298 ns/op after: ArrowBufBenchmarks.setZero avgt 5 66616.553 ± 202.525 ns/op Author: liyafan82 <fan_li_ya@foxmail.com> Closes apache#4715 from liyafan82/fly_0627_zero and squashes the following commits: 545f135 <liyafan82> Improve the performance of ArrowBuf#setZero
The current implementation involves repeated calls of setLong, setInt & setByte. It is more efficient to directly call the native function. Performance improve by 4.8x before: ArrowBufBenchmarks.setZero avgt 5 319616.675 ± 918.298 ns/op after: ArrowBufBenchmarks.setZero avgt 5 66616.553 ± 202.525 ns/op Author: liyafan82 <fan_li_ya@foxmail.com> Closes apache#4715 from liyafan82/fly_0627_zero and squashes the following commits: 545f135 <liyafan82> Improve the performance of ArrowBuf#setZero
The current implementation involves repeated calls of setLong, setInt & setByte. It is more efficient to directly call the native function.
Performance improve by 4.8x
before:
ArrowBufBenchmarks.setZero avgt 5 319616.675 ± 918.298 ns/op
after:
ArrowBufBenchmarks.setZero avgt 5 66616.553 ± 202.525 ns/op