You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2021/08/30 02:55:00 UTC

[jira] [Resolved] (ORC-976) Optimize compute zigZagLiterals

     [ https://issues.apache.org/jira/browse/ORC-976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun resolved ORC-976.
-------------------------------
    Resolution: Fixed

This is resolved via https://github.com/apache/orc/pull/887

> 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
>            Priority: Minor
>             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)