You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Fang Zheng (JIRA)" <ji...@apache.org> on 2019/01/05 03:15:00 UTC

[jira] [Updated] (ORC-456) [C++] Simplify code logic in RleEncoderV2

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

Fang Zheng updated ORC-456:
---------------------------
    Description: 
There is suboptimal code in RleEncoderV2::write() function (between lines 132-146). 

When a tailing min repeat run (i.e., 3 identical values) is detected and there is an ongoing variable run, the code copies the three tailing identical values to a buffer named "tailVals", writes values before these values in literals buffer out, and then copies the 3 values back to the beginning of literals buffer.

Given that the last 3 values are known to be equal to the current value passed in write() function, we do not need to copy those values back and forth through the tailVals buffer. 


  was:
There is suboptimal code in RleEncoderV2::write() function (between lines 132-146). 

When a tailing min repeat run (i.e., 3 identical values) is detected and there is an ongoing variable run, the code copies the tailing identical values to a buffer named "tailVals", writes values before these values in literals buffer out, and then copies the 3 values back to the beginning of literals buffer.

Given that the last 3 values are known to be equal to the current value passed in write() function, we do not need to copy those values back and forth through the tailVals buffer. 



> [C++] Simplify code logic in RleEncoderV2
> -----------------------------------------
>
>                 Key: ORC-456
>                 URL: https://issues.apache.org/jira/browse/ORC-456
>             Project: ORC
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Fang Zheng
>            Priority: Minor
>
> There is suboptimal code in RleEncoderV2::write() function (between lines 132-146). 
> When a tailing min repeat run (i.e., 3 identical values) is detected and there is an ongoing variable run, the code copies the three tailing identical values to a buffer named "tailVals", writes values before these values in literals buffer out, and then copies the 3 values back to the beginning of literals buffer.
> Given that the last 3 values are known to be equal to the current value passed in write() function, we do not need to copy those values back and forth through the tailVals buffer. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)