Skip to content

Hotspot on ~Status() #47774

Closed
Closed

Description

@zdt7ilm

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++

Activity

  1. zdt7ilm commented on Oct 10, 2025

    @zdt7ilm
    Author

    cpu:i9-14900k, os:Ubuntu22, use ninja-release-basic preset.

  2. pitrou commented on Jul 31, 2026

    @pitrou
    Member

    Which compiler did you measure this on?

  3. fanruan-tuco commented on Aug 5, 2026

    @fanruan-tuco

    I measured this with GCC 11.4.0, using C++17 and -O2 (RelWithDebInfo).
    btw: user zdt7ilm is my old account

  4. added a commit that references this issue on Oct 27, 2026
  5. added this to the 27.0.0 milestone on Oct 27, 2026
  6. pitrou commented on Oct 27, 2026

    @pitrou
    Member

    Issue resolved by pull request 50749
    #50749

  7. pitrou commented on Oct 27, 2026

    @pitrou
    Member

    @zhf999 Can you post here so that we can assign this issue to you?

  8. zhf999 commented on Oct 27, 2026

    @zhf999
    Contributor

    @pitrou Sure, please assign this issue to me. Thanks for your help reviewing and improving the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions