Yibo Cai created ARROW-8974:
-------------------------------
Summary: [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
[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)