Liya Fan created ARROW-7098:

             Summary: [Java] Improve the performance of comparing two memory 
                 Key: ARROW-7098
             Project: Apache Arrow
          Issue Type: Improvement
          Components: Java
            Reporter: Liya Fan
            Assignee: Liya Fan

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 

According to the discussion in, loop can be 

This message was sent by Atlassian Jira

Reply via email to