r/cpp • • Oct 25 '26

C++ profiles for initialization and invalidation: WIP implementation prototypes already exist in GCC/Clang

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4415r0.pdf

In this paper it can be seen some interesting profiles progress for prototypes in Gcc and Clang.

20 Upvotes

29 comments sorted by

View all comments

Show parent comment

4

u/ts826848 Oct 25 '26

It would be crucial to ensure that enabling a profile doesn't degrade the generated code for hot loops. Have you (or the committee) looked into how these profiles interact with vectorization or aggressive inlining? That's usually where the biggest performance cliffs appear.

Presumably you'd just disable the profile for the offending code?

3

u/germandiago Oct 25 '26

In theory and as long as it is part of a profile rule, there should be a mechanism.

3

u/ts826848 Oct 25 '26

I think given the context of the conversation that would be a safe assumption to make.