From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18349 invoked by alias); 23 May 2015 17:46:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 18325 invoked by uid 48); 23 May 2015 17:46:21 -0000 From: "bdeyal at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/66263] New: Performance regression from gcc-4.8 and up (trivial sudoku program) Date: Sat, 23 May 2015 17:46:00 -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: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bdeyal 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg01989.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66263 Bug ID: 66263 Summary: Performance regression from gcc-4.8 and up (trivial sudoku program) Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bdeyal at gmail dot com Target Milestone: --- Created attachment 35605 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35605&action=edit Preprocessed source file I ran the attached simple program with gcc-4.6, 4.7, 4.8, 4.9 and 5.1 This is a simple brute force + recursion program that finds all the solutions for a given sudoku board. My input file had about half a million different solutions. System is fedora 21 with gcc 4.9.2 All other compilers were built locally. my compilation command line was: $(CC) -Ofast -W -Wall -DNDEBUG src/sudoku.c -o bin/sudoku Running time results ==================== gcc-4.6.4 0.483s gcc-4.7.4 0.496s gcc-4.8.4 0.749s gcc-4.9.2 0.762s gcc-5.1.0 0.776s Files: ====== Attached preprocessed file to compile. In addition here's the input file contents for solving: - - - - - 1 - 3 - - - 8 - - - - 7 5 - 1 - 9 - - - - - - - 7 - - - - - 1 - - - 8 - 9 - - - 8 - - - 3 - - - - - - - - - - - 9 - 9 2 - - - - 3 - - - - - - - - - - - to test you should run something like: time ./sudoku --quiet < input_file.txt where ./sudoku is the produced executable and input_file.txt is the sudoku board from above. Detailed compiler version and configure options: ================================================ $ gcc-4.6 -v Using built-in specs. COLLECT_GCC=gcc-4.6 COLLECT_LTO_WRAPPER=/opt/gcc46/libexec/gcc/x86_64-redhat-linux/4.6.4/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/opt/gcc46 --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-plugin --enable-initfini-array --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.6.4 (GCC) $ gcc-4.7 -v Using built-in specs. COLLECT_GCC=gcc-4.7 COLLECT_LTO_WRAPPER=/opt/gcc-4.7.4/libexec/gcc/x86_64-redhat-linux/4.7.4/lto-wrapper Target: x86_64-redhat-linux Configured with: ../gcc-4.7.4/configure --prefix=/opt/gcc-4.7.4 --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran --enable-plugin --enable-initfini-array --disable-dssi --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.7.4 (GCC) $ gcc-4.8 -v Using built-in specs. COLLECT_GCC=gcc-4.8 COLLECT_LTO_WRAPPER=/opt/gcc48/libexec/gcc/x86_64-redhat-linux/4.8.4/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/opt/gcc48 --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,go,lto --enable-plugin --enable-initfini-array --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.4 (GCC) $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC) $ gcc-5.0 -v Using built-in specs. COLLECT_GCC=gcc-5.0 COLLECT_LTO_WRAPPER=/opt/gcc5/libexec/gcc/x86_64-redhat-linux/5.1.0/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/opt/gcc5/ --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,go,lto --enable-plugin --enable-initfini-array --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 5.1.0 (GCC)