You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Activity
zdt7ilm commentedon Oct 10, 2025
cpu:i9-14900k, os:Ubuntu22, use ninja-release-basic preset.
pitrou commentedon Jul 31, 2026
Which compiler did you measure this on?
fanruan-tuco commentedon Aug 5, 2026
I measured this with GCC 11.4.0, using C++17 and -O2 (RelWithDebInfo).
btw: user zdt7ilm is my old account
GH-47774: [C++] Force-inline Status::~Status() to improve reading per…
pitrou commentedon Oct 27, 2026
Issue resolved by pull request 50749
#50749
pitrou commentedon Oct 27, 2026
@zhf999 Can you post here so that we can assign this issue to you?
zhf999 commentedon Oct 27, 2026
@pitrou Sure, please assign this issue to me. Thanks for your help reviewing and improving the PR!