public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/105810] New: __glibcxx_assert can be improved greatly.
@ 2022-06-01 21:31 unlvsur at live dot com
  2022-06-01 21:34 ` [Bug libstdc++/105810] " unlvsur at live dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: unlvsur at live dot com @ 2022-06-01 21:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105810

            Bug ID: 105810
           Summary: __glibcxx_assert can be improved greatly.
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

Every function call has to carry the call which adds a burden. With -Os the
function does not even get expanded. The operator[] becomes extremely
expensive.
https://godbolt.org/z/Gcchdrdxj

The situation might get worse when compiling with -fPIC since load/store data
from %rip register needs more instructions.

It can be improved to something like this. Put all the file, line, and
condition information into a separate function. Since the function is an inline
function, the entire program only holds one copy of the debugging information.
https://godbolt.org/z/xc8jnqh5r


https://godbolt.org/z/85M1PE9Te
vs
https://godbolt.org/z/6fsGo41bj


Unfortunately, GCC got ICE. I have submitted the bug report to fix that.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105809

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-02-03 10:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 21:31 [Bug libstdc++/105810] New: __glibcxx_assert can be improved greatly unlvsur at live dot com
2022-06-01 21:34 ` [Bug libstdc++/105810] " unlvsur at live dot com
2022-06-07 13:58 ` redi at gcc dot gnu.org
2022-06-07 23:01 ` unlvsur at live dot com
2022-06-07 23:02 ` unlvsur at live dot com
2022-06-08  8:33 ` redi at gcc dot gnu.org
2022-06-08  8:34 ` unlvsur at live dot com
2022-06-08  8:50 ` redi at gcc dot gnu.org
2022-06-08  8:53 ` unlvsur at live dot com
2022-06-08  8:57 ` unlvsur at live dot com
2022-06-08  8:58 ` unlvsur at live dot com
2024-02-03 10:58 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).