public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/95458] New: Inline strncmp is *much* slower than glibc
@ 2020-06-01 12:20 hjl.tools at gmail dot com
  2020-07-16 20:54 ` [Bug target/95458] " aoliva at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2020-06-01 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95458
           Summary: Inline strncmp is *much* slower than glibc
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com
        Depends on: 43052
  Target Milestone: ---

Similar to PR 43052, inline strncmp is *much* slower than glibc.  PR 43052
was "fixed" by accident:

commit 9b0f6f5e511ca512e4faeabc81d2fd3abad9b02f
Author: Nick Clifton <nickc@redhat.com>
Date:   Fri Aug 12 16:26:11 2011 +0000

    builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi pattern.

            * builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi
            pattern.
            * doc/md.texi (cmpstrn): Note that the comparison stops if both
            fetched bytes are zero.
            (cmpstr): Likewise.
            (cmpmem): Note that the comparison does not stop if both of the
            fetched bytes are zero.

strncmp should be inlined only for -minline-all-stringops.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
[Bug 43052] [4.9/5/6 Regression] Inline memcmp is *much* slower than glibc's,
no longer expanded inline

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

end of thread, other threads:[~2020-10-26 11:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 12:20 [Bug target/95458] New: Inline strncmp is *much* slower than glibc hjl.tools at gmail dot com
2020-07-16 20:54 ` [Bug target/95458] " aoliva at gcc dot gnu.org
2020-08-19 13:22 ` hjl.tools at gmail dot com
2020-10-26 11:17 ` cvs-commit at gcc dot gnu.org
2020-10-26 11:17 ` hjl.tools at gmail dot com

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).