From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DABA386F817; Sun, 23 Aug 2020 06:03:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DABA386F817 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598162604; bh=hwQlhwS7S9bArytmIgC0kcjyhCjm18He4UODzTB9Tko=; h=From:To:Subject:Date:From; b=QyvolAXgiKZIcd7877pHTkIzlZHtCQ6LDlWDtR8oAX1wmKzEpU2Rf0p7Rzu5n1T4D 3TEfBPeL+jV7G6h2lsZVJRk6bceHnZ+/0fqT2pcEI9d8mRWsx0z3ZUNnvTNHqkJraH GiFRZMuxpfSkR3P47Z1kXE05Biak9/iM1RMllve4= From: "mattreecebentley at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96750] New: 10-12% performance decrease in benchmark going from GCC8 to GCC9/GCC10 Date: Sun, 23 Aug 2020 06:03:23 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mattreecebentley at gmail dot com 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: Sun, 23 Aug 2020 06:03:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96750 Bug ID: 96750 Summary: 10-12% performance decrease in benchmark going from GCC8 to GCC9/GCC10 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mattreecebentley at gmail dot com Target Milestone: --- Created attachment 49102 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D49102&action=3Dedit Compiler output Have recently been working on a new version of the plf::colony container (plflib.org) and found GCC9 was giving ~10% worse performance on average in= a given benchmark than GCC8. Further investigation found GCC10 was just as ba= d. The effect is repeatable across architectures - I've tested on xubuntu, win= dows running nuwen mingw, and on Core2 and Haswell CPUs, with and without -march=3Dnative specified. Compiler flags are: -O2;-march=3Dnative;-std=3Dc++17 Code presented is with an absolute minimum use-case - other benchmarks have= not shown such strong performance differences - including both simpler and more complex tests. So I cannot reduce further, please do not ask me to do so. The benchmark in question inserts into a container initially then iterates = over container elements repeatedly, randomly erasing and/or inserting new elemen= ts. Compilers/environments used: Xubuntu 20: GCC8.4, GCC9.3, GCC10.0.1 Windows 7: Nuwen mingw GCC8.2, nuwen mingw GCC9.2 The attached code output is from the Xubuntu environment. Any questions let me know. I will help where I can, but my knowledge of assembly is limited. Information on code components: Nanotimer is a ~nanosecond-precision sub-timeslice cross-platform timer. Colony is a bucket-array-like unordered sequence container. The attached zip contains the build logs and compiler preprocessed outputs = for GCC 8.4, 9.3 and 10.0.1 Thanks- Mat=