This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug gcov-profile/70773] New: Profiling makes sudoku solver slower
- From: "tulipawn at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 23 Apr 2016 20:51:17 +0000
- Subject: [Bug gcov-profile/70773] New: Profiling makes sudoku solver slower
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70773
Bug ID: 70773
Summary: Profiling makes sudoku solver slower
Product: gcc
Version: 5.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
Assignee: unassigned at gcc dot gnu.org
Reporter: tulipawn at gmail dot com
Target Milestone: ---
Created attachment 38334
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38334&action=edit
.c, .i and .gcda files
Compiling the attached sudoku solver the usual way and running the benchmark:
$ gcc -O3 -Wall sudoku.c -o sudokuC
$ time ./sudokuC 1>&2 > /dev/null
takes 1.25s, whereas doing a profile build:
$ gcc -O3 -Wall sudoku.c -o sudokuC -fprofile-generate
$ time ./sudokuC 1>&2 > /dev/null
$ gcc -O3 -Wall sudoku.c -o sudokuC -fprofile-use
$ time ./sudokuC 1>&2 > /dev/null
takes 1.5s which means it's 20% slower. Probably shouldn't happen.