[ 
https://issues.apache.org/jira/browse/ORC-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16710741#comment-16710741
 ] 

ASF GitHub Bot commented on ORC-445:
------------------------------------

fangzheng commented on issue #346: ORC-445: [C++] Code improvements in 
RLEV2Util.
URL: https://github.com/apache/orc/pull/346#issuecomment-444690006
 
 
   @wgtmac Hi Gang, 
   I put together a test program and some measurements here: 
https://github.com/fangzheng/RLEV2Util_performance
   
   The new functions are 20 to 40% faster than the original ones. 
   
   I've also committed some new changes:
   1. change the lookup arrays from uint32_t to uint8_t to reduce their sizes 
and get better cache behavior.
   2. add a unit test TestRLEV2Util.cc to verify that the new implementation 
produces the same results as original one.
   3. simplify the code in encodeBitWidth() to avoid calling 
getClosestFixedBits().
   
   Please let me know if you have further suggestions. Thanks.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [C++] Code improvements in RLEV2Util
> ------------------------------------
>
>                 Key: ORC-445
>                 URL: https://issues.apache.org/jira/browse/ORC-445
>             Project: ORC
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Fang Zheng
>            Priority: Minor
>
> This is a follow-up of ORC-444. The following functions in RLEV2Util.hh can 
> be optimized by replacing the if-else statements with direct array lookup:
>   inline uint32_t getClosestFixedBits(uint32_t n);
>   inline uint32_t getClosestAlignedFixedBits(uint32_t n);
>   inline uint32_t encodeBitWidth(uint32_t n);
>   inline uint32_t findClosestNumBits(int64_t value);



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

Reply via email to