Hotspot on ~Status()
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the enhancement requested
I use apache arrow to read some parquets (tpch lineitem table, about 25millon rows),
observed hotspot on ~Status() method by intel Vtune,
then I try to inline it use ARROW_FORCE_INLINE, **faster 15% stably**
before:
` ~Status() noexcept {
if (ARROW_PREDICT_FALSE(state_ != NULL)) {
if (!state_->is_constant) {
DeleteState();
}
}
}`
after:
` ARROW_FORCE_INLINE ~Status() noexcept {
if (ARROW_PREDICT_FALSE(state_ != NULL)) {
if (!state_->is_constant) {
DeleteState();
}
}
}`
so, is this a suitable optimization in all cases? any problems with it?
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.