Your message dated Sat, 22 Jan 2005 16:51:43 +0100 with message-id <[EMAIL PROTECTED]> and subject line Bug#291693: gcc-3.3: optimization -O2 is worst than -O1 has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) -------------------------------------- Received: (at submit) by bugs.debian.org; 22 Jan 2005 14:07:10 +0000 >From [EMAIL PROTECTED] Sat Jan 22 06:07:10 2005 Return-path: <[EMAIL PROTECTED]> Received: from oohaa.net (carredas.oohaa.net) [212.91.164.90] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1CsLuv-0004mX-00; Sat, 22 Jan 2005 06:07:09 -0800 Received: from localhost (localhost [127.0.0.1]) by carredas.oohaa.net (Postfix) with ESMTP id BE01FAFB3A; Sat, 22 Jan 2005 16:26:49 +0200 (EET) Received: from carredas.oohaa.net ([127.0.0.1]) by localhost (carredas [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04091-05; Sat, 22 Jan 2005 16:26:49 +0200 (EET) Received: by carredas.oohaa.net (Postfix, from userid 1000) id 826C3AFB3B; Sat, 22 Jan 2005 16:26:49 +0200 (EET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Bozhan Boiadzhiev <[EMAIL PROTECTED]> To: Debian Bug Tracking System <[EMAIL PROTECTED]> Subject: gcc-3.3: optimization -O2 is worst than -O1 X-Mailer: reportbug 3.2 Date: Sat, 22 Jan 2005 16:26:49 +0200 Message-Id: <[EMAIL PROTECTED]> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at carredas.oohaa.net Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE autolearn=no version=2.60-bugs.debian.org_2005_01_02 X-Spam-Level: Package: gcc-3.3 Version: 1:3.3.5-5 Severity: normal I found this page http://www.network-theory.co.uk/docs/gccintro/gccintro_43.html and i diceide to try it becouse i was curios of optimizations. And the results are little strange. I have two more configuration on woody and one redhat9 with default packages installed and updated. Here are results: Debian Testing: Linux version 2.6.8-2-686 ([EMAIL PROTECTED]) (gcc version 3.3.5 (Debian 1:3.3.5-5)) #1 Sat Jan 8 16:50:08 EST 200 5 carredas:/home/edmon# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Celeron(R) CPU 2.00GHz stepping : 9 cpu MHz : 1991.977 cache size : 128 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid bogomips : 3948.54 carredas:/home/edmon# gcc -Wall -O0 test.c -lm carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m8.381s user 0m8.374s sys 0m0.004s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m8.409s user 0m8.360s sys 0m0.007s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m8.381s user 0m8.378s sys 0m0.004s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m8.339s user 0m8.333s sys 0m0.001s carredas:/home/edmon# gcc -Wall -O1 test.c -lm carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m5.644s user 0m5.641s sys 0m0.002s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m5.640s user 0m5.638s sys 0m0.002s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m5.647s user 0m5.646s sys 0m0.001s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m5.651s user 0m5.649s sys 0m0.000s carredas:/home/edmon# gcc -Wall -O2 test.c -lm carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m5.726s user 0m5.722s sys 0m0.002s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m5.731s user 0m5.723s sys 0m0.003s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m5.792s user 0m5.731s sys 0m0.008s carredas:/home/edmon# gcc -Wall -O3 test.c -lm carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m4.218s user 0m4.215s sys 0m0.003s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m4.186s user 0m4.182s sys 0m0.003s carredas:/home/edmon# time ./a.out sum = 4e+38 real 0m4.189s user 0m4.187s sys 0m0.001s Debian Woody: Linux version 2.2.19 ([EMAIL PROTECTED]) (gcc version 2.7.2.3) #1 Sat Jun 9 13:04:06 EST 2001 mail:~# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 5 model : 4 model name : Pentium MMX stepping : 3 cpu MHz : 171.309 fdiv_bug : no hlt_bug : no sep_bug : no f00f_bug : yes coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 mmx bogomips : 341.60 mail:~# gcc -Wall -O0 test.c -lm mail:~# time ./a.out sum = 4e+38 real 1m18.922s user 1m13.630s sys 0m0.010s mail:~# gcc -Wall -O1 test.c -lm mail:~# time ./a.out sum = 4e+38 real 0m46.862s user 0m45.240s sys 0m0.030s mail:~# gcc -Wall -O2 test.c -lm mail:~# time ./a.out sum = 4e+38 real 0m45.667s user 0m44.320s sys 0m0.010s mail:~# gcc -Wall -O3 test.c -lm mail:~# time ./a.out sum = 4e+38 real 0m22.718s user 0m21.730s sys 0m0.010s And REd Hat 9: Linux version 2.4.20-8smp ([EMAIL PROTECTED]) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 SMP Thu M ar 13 17:45:54 EST 2003 [EMAIL PROTECTED] root]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Pentium(R) 4 CPU 2.40GHz stepping : 9 cpu MHz : 2411.645 cache size : 512 KB physical id : 0 siblings : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm bogomips : 4810.34 processor : 1 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Pentium(R) 4 CPU 2.40GHz stepping : 9 cpu MHz : 2411.645 cache size : 512 KB physical id : 0 siblings : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm bogomips : 4810.34 [EMAIL PROTECTED] root]# gcc -Wall -O0 test.c -lm [EMAIL PROTECTED] root]# time ./a.out sum = 4e+38 real 0m10.779s user 0m10.780s sys 0m0.000s [EMAIL PROTECTED] root]# gcc -Wall -O1 test.c -lm [EMAIL PROTECTED] root]# time ./a.out sum = 4e+38 real 0m5.161s user 0m5.140s sys 0m0.000s [EMAIL PROTECTED] root]# gcc -Wall -O2 test.c -lm [EMAIL PROTECTED] root]# time ./a.out sum = 4e+38 real 0m5.123s user 0m5.110s sys 0m0.000s [EMAIL PROTECTED] root]# gcc -Wall -O3 test.c -lm [EMAIL PROTECTED] root]# time ./a.out sum = 4e+38 real 0m3.245s user 0m3.240s sys 0m0.000s As you see result for testing for -O2 are worst than -O1 :( I am not very in compiling and so on . Maybe i am missing something. It will be good if bigger optimization gives better results:))) :) -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.8-2-686 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages gcc-3.3 depends on: ii binutils 2.15-5 The GNU assembler, linker and bina ii cpp-3.3 1:3.3.5-5 The GNU C preprocessor ii gcc-3.3-base 1:3.3.5-5 The GNU Compiler Collection (base ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an ii libgcc1 1:3.4.3-6 GCC support library -- no debconf information --------------------------------------- Received: (at 291693-done) by bugs.debian.org; 22 Jan 2005 15:52:16 +0000 >From [EMAIL PROTECTED] Sat Jan 22 07:52:15 2005 Return-path: <[EMAIL PROTECTED]> Received: from smtp05.web.de [217.72.192.209] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1CsNYd-0003Eu-00; Sat, 22 Jan 2005 07:52:15 -0800 Received: from [80.144.168.15] (helo=juist) by smtp05.web.de with asmtp (TLSv1:DES-CBC3-SHA:168) (WEB.DE 4.103 #184) id 1CsNY9-0007ha-00 for [EMAIL PROTECTED]; Sat, 22 Jan 2005 16:51:45 +0100 Received: from falk by juist with local (Exim 4.43) id 1CsNY8-0002Mu-4Y for [EMAIL PROTECTED]; Sat, 22 Jan 2005 16:51:44 +0100 To: [EMAIL PROTECTED] Subject: Re: Bug#291693: gcc-3.3: optimization -O2 is worst than -O1 References: <[EMAIL PROTECTED]> From: Falk Hueffner <[EMAIL PROTECTED]> X-Face: "iUeUu$b*W_"w?tV83Y3*r:`rh&dRv}$YnZ3,LVeCZSYVuf[Gpo*5%_=/\_!gc_,SS}[~xZ wY77I-M)xHIx:2f56g%/`SOw"Dx%4Xq0&f\Tj~>|QR|vGlU}TBYhiG(K:2<T^ Date: Sat, 22 Jan 2005 16:51:43 +0100 In-Reply-To: <[EMAIL PROTECTED]> (Bozhan Boiadzhiev's message of "Sat, 22 Jan 2005 16:26:49 +0200") Message-ID: <[EMAIL PROTECTED]> User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (cabbage, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: [EMAIL PROTECTED] X-Sender: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER autolearn=no version=2.60-bugs.debian.org_2005_01_02 X-Spam-Level: Bozhan Boiadzhiev <[EMAIL PROTECTED]> writes: > carredas:/home/edmon# gcc -Wall -O1 test.c -lm > carredas:/home/edmon# time ./a.out > sum = 4e+38 > > real 0m5.644s > user 0m5.641s > sys 0m0.002s > carredas:/home/edmon# gcc -Wall -O2 test.c -lm > carredas:/home/edmon# time ./a.out > sum = 4e+38 > > real 0m5.726s > user 0m5.722s > sys 0m0.002s > > As you see result for testing for -O2 are worst than -O1 :( But only marginally, and on a completely artificial test case, and I can't reproduce it on a different CPU (Athlon64). So I don't think this is worth examining. -- Falk -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]