https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113046
--- Comment #1 from cqwrteur <unlvsur at live dot com> --- -Os optimization could observe the issue more clearly. The number of instructions reduced 51.94%, which is huge. https://godbolt.org/z/Eh1P1vvo5 I guarantee you this will improve the overall performance of C++ for a lot.