Yiqun Zhang created ORC-976:
-------------------------------
Summary: Optimize compute zigZagLiterals
Key: ORC-976
URL: https://issues.apache.org/jira/browse/ORC-976
Project: ORC
Issue Type: Improvement
Components: Java
Affects Versions: 1.7.0
Reporter: Yiqun Zhang
Fix For: 1.7.0
{code:java}
private void computeZigZagLiterals() {
// populate zigzag encoded literals
long zzEncVal = 0;
for (int i = 0; i < numLiterals; i++) {
if (signed) {
zzEncVal = utils.zigzagEncode(literals[i]);
} else {
zzEncVal = literals[i];
}
zigzagLiterals[i] = zzEncVal;
}
}
{code}
Avoid conditional judgments in loops.
The unsigned case can use literals instead of zigzagLiterals. The number of
copies is proportional to the amount of user writes, which optimizes write
performance.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)