Liya Fan created ARROW-6297: ------------------------------- Summary: [Java] Compare ArrowBufPointers by unsinged integers Key: ARROW-6297 URL: https://issues.apache.org/jira/browse/ARROW-6297 Project: Apache Arrow Issue Type: Improvement Components: Java Reporter: Liya Fan Assignee: Liya Fan
Currently, ArrowBufPointers compare by bytes in lexicographic order. Another way is to compare by unsigned integers (longs, ints, & bytes). The second way involves additional bit operations for each iteration. However, it can compare 8 bytes at a time. So it is overall faster: Compare by unsigned integers: ArrowBufPointerBenchmarks.compareBenchmark avgt 5 65.722 ± 0.381 ns/op Compare byte-wise: ArrowBufPointerBenchmarks.compareBenchmark avgt 5 681.372 ± 0.604 ns/op -- This message was sent by Atlassian Jira (v8.3.2#803003)