From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6290385DC1B; Mon, 27 Apr 2020 01:24:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6290385DC1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587950681; bh=P1YJJQ3NxZc2q3bR1e2zbk32MgEC7OAHcnznp6A+Vmw=; h=From:To:Subject:Date:From; b=MFYQm0ArzNwxuYpx9nWolu3zLbBwQ/XpVCcA4k27sTZ8nl1OdB2E1sA7847nLv+9h C8rdP45/ZwEXkbh/qr/3HVZpytCZEEUarBngiVzZ3L1VsWtobucLAa1XhRpC9TRt7s QDwHpjY9kchhhgYTJxpH7TaMLXjFAb9OlO3tFTrM= From: "ishikawa at yk dot rim.or.jp" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94781] New: version 9.3 g++ compilation time is slower by 20% or much more (closer to 50 % sometimes) in comparison to v7. Date: Mon, 27 Apr 2020 01:24:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ishikawa at yk dot rim.or.jp X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2020 01:24:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94781 Bug ID: 94781 Summary: version 9.3 g++ compilation time is slower by 20% or much more (closer to 50 % sometimes) in comparison to v7. Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ishikawa at yk dot rim.or.jp Target Milestone: --- Created attachment 48380 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48380&action=3Dedit -ftime-print log for V9, V8 and V7 g++ compiler compiling preprocessed UnifiedBindings23.cpp Thank you for maintaining the great package. I use GCC for PC and embedded systems development. I compile mozilla Thunderbird mail client source files using GCC to create patches to fix the bugs of the mail client. Lately, when I switched from GCC V7 to GCC v9, I noticed a great slowdown of compilation time. I was hampered with other bugs which I sorted out and the= n=20 the slow compilation time became very apparent. I created a small awk script to check the compilation time of thunderbird source files. The following is what I found. top 20 in terms of elapsed time for g++-7 compilation time. 165.097862 : UnifiedBindings23.cpp 102.842003 : UnifiedBindings1.cpp 102.387905 : Unified_cpp_dom_base2.cpp 79.692992 : Unified_cpp_layout_generic2.cpp 78.299717 : UnifiedBindings4.cpp 78.239538 : Unified_cpp_dom_ipc0.cpp 77.236254 : Unified_cpp_src_peerconnection0.cpp 75.737330 : UnifiedBindings12.cpp 72.586055 : Unified_cpp_dom_canvas0.cpp 72.564836 : UnifiedBindings10.cpp 72.556511 : UnifiedProtocols12.cpp 71.924969 : Unified_cpp_layout_painting0.cpp 70.908968 :=20=20 /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/indexedDB/ActorsParent.cpp 70.167488 : UnifiedBindings3.cpp 69.194670 : UnifiedBindings22.cpp 68.657080 : UnifiedBindings21.cpp 68.106164 : Unified_cpp_docshell_base0.cpp 67.494041 : Unified_cpp_layout_base1.cpp 65.638745 : Unified_cpp_dom_canvas4.cpp top 20 in terms of elapsed time for g++-9 compilation time. Elapsed time 259.956334 : UnifiedBindings23.cpp Elapsed time 149.609287 : UnifiedBindings1.cpp Elapsed time 132.656618 : Unified_cpp_layout_generic2.cpp Elapsed time 125.823251 : Unified_cpp_dom_base2.cpp Elapsed time 113.072732 : UnifiedBindings4.cpp Elapsed time 107.252363 : Unified_cpp_layout_painting0.cpp Elapsed time 100.176409 :=20 /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/indexedDB/ActorsParent.cpp Elapsed time 99.760067 : UnifiedProtocols12.cpp Elapsed time 99.549702 : Unified_cpp_dom_canvas0.cpp Elapsed time 99.372578 : Unified_cpp_dom_ipc0.cpp Elapsed time 97.947955 : Unified_cpp_image_test_gtest0.cpp Elapsed time 97.134518 : UnifiedBindings21.cpp Elapsed time 95.530481 : UnifiedBindings3.cpp Elapsed time 94.182883 : UnifiedBindings12.cpp Elapsed time 92.836375 : Unified_cpp_src_peerconnection0.cpp Elapsed time 92.755637 : Unified_cpp_editor_libeditor1.cpp Elapsed time 91.168096 : UnifiedBindings7.cpp Elapsed time 90.080235 : UnifiedBindings10.cpp Elapsed time 89.838960 : Unified_cpp_layout_base1.cpp You can see that the compilation time slows down by about 20 % most of the = time and 30, 50% slow down can be observed for the top two files. I am going to show the -ftime-print output for the compilation of V9, V8, V7 g++ compiler of the same file in the attachment. But do note that mozilla Thunderbird configure script is very clever and tr= y to add as many options as supported to each version of the compiler and thus, obviously v9 compiler may be doing a bit more than other version. Oh, yes, the slowdown has happened in v8 already (!) In the attachment, you can see that v8 and v9 are equally slow in terms of elapsed time. I can see that "phase last asm" has large elapsed time for v8 and v9 in comparison to v7. Otherwise, I could not see a clear smoking gun. The elapsed time of v7 and V9 arey 133 and 159sec for UnifiedBindings23.c= pp (prepressed). But this difference is obviously inflated in real world workl= oad when the compilation is run in parallel with "make -j6" in a 7 hypercore VirtualBox image. In any case, a single thread run has about 26 second difference which is ab= out 20% slower already. Any possible hint or fix for speedup is appreciated. The compilation time slowdown hurts.: now building thunderbird in my spare = time is a one night job after modifying a few source file. I used to check the behavior of modified binary before going to bed at least shortly and let a = test suite run. I can't do that any more. Any checking needs to be done the next day...=