You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Yibo Cai (Jira)" <ji...@apache.org> on 2020/05/28 05:43:00 UTC

[jira] [Commented] (ARROW-8974) [C++] Refine TransferBitmap template parameters

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

Yibo Cai commented on ARROW-8974:
---------------------------------

See about 2% performance drop if replace template parameter "invert_bits" with function parameter. No performance difference for "restore_trailing_bits".

> [C++] Refine TransferBitmap template parameters
> -----------------------------------------------
>
>                 Key: ARROW-8974
>                 URL: https://issues.apache.org/jira/browse/ARROW-8974
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Yibo Cai
>            Assignee: Yibo Cai
>            Priority: Minor
>
> [TransferBitmap|https://github.com/apache/arrow/blob/44e723d9ac7c64739d419ad66618d2d56003d1b7/cpp/src/arrow/util/bit_util.cc#L110] has two template parameters of bool type with four combinations.
> Change them to function parameters can reduce code size. I think "restore_trailing_bits" cannot impact performance. "invert_bits" needs benchmark.
> Also, bool parameter is hard to figure out at [caller side|https://github.com/apache/arrow/blob/44e723d9ac7c64739d419ad66618d2d56003d1b7/cpp/src/arrow/util/bit_util.cc#L208], better to use meaningful defines.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)