Description
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; } }
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.
Attachments
Issue Links
- links to