public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65328] New: GCC perf issue when compiling templates - 120x slower than Clang
@ 2015-03-05 18:42 juchem at gmail dot com
  2015-03-05 18:47 ` [Bug c++/65328] " pinskia at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: juchem at gmail dot com @ 2015-03-05 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65328
           Summary: GCC perf issue when compiling templates - 120x slower
                    than Clang
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: juchem at gmail dot com

Debian's g++ 4.9.2 and gcc 4.8.4 are extremely slow at compiling some
templates.

They take more than 1h to compile the same code that Clang 3.4 needs 39
seconds. 

How to reproduce:

  $ git clone https://github.com/facebook/fatal.git \
    && cd fatal && git checkout -b dev origin/dev \
    && clang++-3.4 --version && time clang++-3.4 -Wall -std=c++11 -I . \
      fatal/type/benchmark/prefix_tree_benchmark.cpp \
    && g++-4.8 --version && time g++-4.8 -Wall -std=c++11 -I . \
      fatal/type/benchmark/prefix_tree_benchmark.cpp \
    && g++-4.9 --version && time g++-4.9 -Wall -std=c++11 -I . \
      fatal/type/benchmark/prefix_tree_benchmark.cpp

Output:

Cloning into 'fatal'...
remote: Counting objects: 1124, done.
remote: Compressing objects: 100% (226/226), done.
remote: Total 1124 (delta 119), reused 0 (delta 0), pack-reused 884
Receiving objects: 100% (1124/1124), 803.31 KiB | 1.20 MiB/s, done.
Resolving deltas: 100% (727/727), done.
Checking connectivity... done.
Branch dev set up to track remote branch dev from origin.
Switched to a new branch 'dev'

Debian clang version 3.4.2-13 (tags/RELEASE_34/dot2-final) (based on LLVM
3.4.2)
Target: x86_64-pc-linux-gnu
Thread model: posix

real    0m39.205s
user    0m37.416s
sys     0m1.432s

g++-4.8 (Debian 4.8.4-1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


real    64m37.227s
user    61m42.556s
sys     0m10.604s

g++-4.9 (Debian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


real    65m33.790s
user    63m52.544s
sys     0m7.664s


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

end of thread, other threads:[~2022-06-28 16:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-05 18:42 [Bug c++/65328] New: GCC perf issue when compiling templates - 120x slower than Clang juchem at gmail dot com
2015-03-05 18:47 ` [Bug c++/65328] " pinskia at gcc dot gnu.org
2015-03-05 18:49 ` [Bug c++/65328] New: " Jan Hubicka
2015-03-05 18:49 ` [Bug c++/65328] " hubicka at ucw dot cz
2015-03-05 18:58 ` juchem at gmail dot com
2015-03-05 18:59 ` juchem at gmail dot com
2015-03-05 19:00 ` juchem at gmail dot com
2015-03-05 19:01 ` juchem at gmail dot com
2015-03-05 19:05 ` juchem at gmail dot com
2015-03-05 19:38 ` trippels at gcc dot gnu.org
2022-06-09 16:01 ` ppalka at gcc dot gnu.org
2022-06-10 20:10 ` cvs-commit at gcc dot gnu.org
2022-06-11  1:23 ` juchem at gmail dot com
2022-06-28 16:24 ` ppalka 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).