Commits


liyafan82 authored and Micah Kornfield committed d130910f689
ARROW-7098: [Java] Improve the performance of comparing two memory blocks We often use the 8-4-1 paradigm to compare two blocks of memory: 1. First compare by 8-byte blocks in a loop 2. Then compare by 4-byte blocks in a loop 3. Last compare by 1-byte blocks in a loop It can be proved that the second loop runs at most once. So we can replace the loop with a if statement, which will save us a comparison and two jump operations. According to the discussion in https://github.com/apache/arrow/pull/5508#discussion_r343973982, loops can be expensive. Closes #5790 from liyafan82/fly_1108_if and squashes the following commits: d747762ae <liyafan82> Improve the performance of comparing two memory blocks Authored-by: liyafan82 <fan_li_ya@foxmail.com> Signed-off-by: Micah Kornfield <emkornfield@gmail.com>