This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
other/9359: odd performance behavior on Athlon XP1800+
- From: lda at skarven dot net
- To: gcc-gnats at gcc dot gnu dot org
- Cc: krr at skarven dot net
- Date: 17 Jan 2003 22:15:25 -0000
- Subject: other/9359: odd performance behavior on Athlon XP1800+
- Reply-to: lda at skarven dot net
>Number: 9359
>Category: other
>Synopsis: odd performance behavior on Athlon XP1800+
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Fri Jan 17 14:16:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Larry Auton
>Release: gcc-2.95.3
>Organization:
>Environment:
GNU/Linux on Athlon XP1800+
>Description:
unexpected performance difference with no obvious explanation.
take a look at the attached program. on an Athlon XP1800+,
the run-time varies by a factor of four with a single change
that should make no difference at all.
the code runs the same speed on Intel machines regardless of the change.
I diffed the assembly language code and found only a single line difference:
$ diff fa sl
28c28
< movl $0,-8(%ebp)
---
> nop
>How-To-Repeat:
: eagle 632$; cc t.c ; time a.out
real 0m2.306s
user 0m2.250s
sys 0m0.050s
: eagle 633$; cc -DFAST t.c ; time a.out
real 0m0.671s
user 0m0.620s
sys 0m0.060s
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="t.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="t.c"
dm9pZCBmb28oKSB7IH0KCmludAptYWluKCkKewogICAgaW50IGwsIHk7CgogICAgeSA9IDA7Cgog
ICAgaWYgKHkgIT0gMCkgZm9vKCk7CgojaWZkZWYgRkFTVAogICAgeSA9IDA7CiNlbmRpZgoKICAg
IGZvciAobCA9IDAgOyBsIDw9IDEwMDAwMDAwMCA7IGwrKykgZm9vKCk7Cn0K