After merging P0551R3 "Thou Shalt Not Specialize std Function Templates!" users are now forbidden to explicitly specialize std::iter_swap. Consequently, we can expand calls inline into callsites for a bit of throughput and improved debug codegen / UX under as-if. Should the expansion be _Swap_adl(*a, *b);, or should we inline that as well and use swap(*a, *b); // intentional ADL? _Swap_adl is conventional, but perhaps its time to update that convention for another tiny bit of throughput?
We should see what other maintainers think about inlining _Swap_adl before wasting any effort on doing so - I'll label this [decision needed] for now.
After merging P0551R3 "Thou Shalt Not Specialize std Function Templates!" users are now forbidden to explicitly specialize
std::iter_swap. Consequently, we can expand calls inline into callsites for a bit of throughput and improved debug codegen / UX under as-if. Should the expansion be_Swap_adl(*a, *b);, or should we inline that as well and useswap(*a, *b); // intentional ADL?_Swap_adlis conventional, but perhaps its time to update that convention for another tiny bit of throughput?We should see what other maintainers think about inlining
_Swap_adlbefore wasting any effort on doing so - I'll label this [decision needed] for now.