The original __dynamic_cast implementation does not use the ABI-provided src2dst_offset parameter which helps improve performance on the hot paths. This patch improves the performance on the hot paths in __dynamic_cast by leveraging hints provided by the src2dst_offset parameter. This patch also includes a performance benchmark suite for the __dynamic_cast implementation.
philnik ldionne EricWF avogelsgesang
- Group Reviewers
Restricted Project Restricted Project
- rGc9d475c937d2: [libc++abi] Improve performance of __dynamic_cast
Thanks for looking into this and especially for adding a benchmark! Can you please rebase onto main so that the CI triggers correctly?
LGTM, but you'll need approval from #libc_abi.
You are missing the license header.
Should there be a Release Note added for this significant performance improvement?
Please make sure you have a green CI run before landing. Adding a release note would make sense -- you can add it in libcxx/.
The libcxx CI fails because:
- git-clang-format command not found;
- No CMAKE_C_COMPILER could be found;
- No CMAKE_CXX_COMPILER could be found.
Is this a CI configuration issue? How to solve it?
Nice! The CI is green again :)
@Lancern do you have commit access or do you need someone to commit this on your behalf? Can you still add release notes, pointing out the performance improvements? (If not, I can also propose some release notes for this in a separate patch)
@avogelsgesang I don't have commit access so I think somebody else needs to commit this. And where can I add release notes? I'm not clear on how to add release notes.
The release notes should be added to libcxx/docs/ReleaseNotes.rst as "reStructuredText", in the form of a new bullet point. I guess this point would best fit into the "Improvements and New Features" section. Please make sure to point out in the release notes that this improvement shipped in the libcxxabi and not libcxx