cyb70289 commented on a change in pull request #10009:
URL: https://github.com/apache/arrow/pull/10009#discussion_r613724252
##########
File path: cpp/src/arrow/util/bit_run_reader.h
##########
@@ -480,8 +480,8 @@ Status VisitSetBitRuns(const uint8_t* bitmap, int64_t
offset, int64_t length,
}
template <typename Visit>
-void VisitSetBitRunsVoid(const uint8_t* bitmap, int64_t offset, int64_t length,
- Visit&& visit) {
+inline void VisitSetBitRunsVoid(const uint8_t* bitmap, int64_t offset, int64_t
length,
Review comment:
Add `inline` hint.
If the caller is from a cpp source, compiler is willing to inline. But if
the caller is from a header file, compiler prefers non-inline, though in
reality it doesn't increase binary size compared with called from source.
Non-inline causes big perf drop as the visitor becomes a function call and
cannot be optimized together with the loop.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]