From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 22 May 2006 21:57:53 +0400 From: Alexey Tourbin To: devel@altlinux.ru Message-ID: <20060522175753.GE23861@localhost.localdomain> Mail-Followup-To: devel@altlinux.ru Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EXKGNeO8l0xGFBjy" Content-Disposition: inline Subject: [devel] perlbench: -Os vs -O2 X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.7 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2006 17:56:32 -0000 Archived-At: List-Archive: List-Post: --EXKGNeO8l0xGFBjy Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =F0=CF=CB=C1 =CF=CB=CF=CE=DE=C1=D4=C5=CC=D8=CE=CF =CE=C5 =DA=C1=C2=D9=CC. =F7 perl58.spec =C5=D3=D4=D8 =D4=C1=CB=CF=CA =CB=CF=CD=CD=C5=CE=D4=C1=D2=C9= =CA: # Custom optimization. This will affect all perl binary modules. Why real= ly? # Because the whole perlapi(1) is heavily based on macros. Here is an exam= ple: # $ echo "SvPV(x,y)" | gcc -include /usr/lib/perl5/i386-linux/CORE/perl.h -= E - | tail -1 # (((x)->sv_flags & (0x00040000)) =3D=3D 0x00040000 ? ((y =3D ((XPV*) (x)->= sv_any)->xpv_cur), ((XPV*) (x)->sv_any)->xpv_pv) : Perl_sv_2pv_flags(my_per= l, x,&y,2)) %define _optlevel s %add_optflags -D_GNU_SOURCE -momit-leaf-frame-pointer =F4=C5=D0=C5=D2=D8 =CB=CF=CC=C9=DE=C5=D3=D4=D7=C5=CE=CE=D9=C5 =C8=C1=D2=C1= =CB=D4=C5=D2=C9=D3=D4=C9=CB=C9 =DC=CB=D3=D0=C5=D2=C9=CD=C5=CE=D4=C1. =FA= =C1 =CF=D3=CE=CF=D7=D5 =C2=D9=CC =D7=DA=D1=D4 =D0=C1=CB=C5=D4 perlbench http://search.cpan.org/dist/perlbench/ =FC=D4=CF= =D4 =D0=C1=CB=C5=D4 =D3 =D7=D9=D3=CF=CB=CF=CA =D4=CF=DE=CE=CF=D3=D4=D8=C0 =DA=C1=CD=C5=D2=D1=C5=D4 = =D7=D2=C5=CD=D1 =D7=D9=D0=CF=CC=CE=C5=CE=C9=D1 =CE=C5=CB=CF=D4=CF=D2=D9=C8 = =D0=D2=C9=CD=C9=D4=C9=D7=CF=D7 =D7 libperl. =F3=CF=C2=C9=D2=C1=CC=D3=D1 perl-5.8.7 =CE=C1 =D0=D2=CF=DB=CC=CF=C7=CF=C4= =CE=C5=CD =D3=C9=DA=C9=C6=C5. =FA=C1=CD=C5=D2=D9 =D0=D2=CF=C9=DA=D7=C5=C4= =C5=CE=D9 =CE=C1 =CD=CF=C5=CD =CD=CF=C5=CD =CE=CF=D7=CF=CD =CB=CF=CD=D0=D8=C0=D4=C5=D2=C5, =CB=CF=D4=CF= =D2=D9=CA =CD=CE=C5 =D0=CF=C4=C1=D2=C9=CC =E4=C9=CD=C1 =EC=C5=D7=C9=CE. = =F0=D2=CF=C3=C5=D3=D3=CF=D2 AMD Athlon(tm) 64 Processor 3200+, 2050.195 MHz, 512 KB cache size, 4108.95 bog= omips. =F2=C5=DA=D5=CC=D8=D4=C1=D4=D9 =C4=CC=D1 -O2: arith/mixed 34 arith/trig 42 array/copy 113 array/foreach 39 array/index 55 array/pop 57 array/shift 58 array/sort-num 70 array/sort 36 call/0arg 64 call/1arg 62 call/2arg 56 call/9arg 91 call/empty 42 call/fib 72 call/method 65 call/wantarray 87 hash/copy 83 hash/each 81 hash/foreach-sort 43 hash/foreach 52 hash/get 35 hash/set 37 loop/for-c 38 loop/for-range-const 73 loop/for-range 48 loop/getline 63 loop/while-my 45 loop/while 43 re/const 40 re/w 41 startup/fewmod 8 startup/lotsofsub 20 startup/noprog 11 string/base64 110 string/htmlparser 90 string/index-const 76 string/index-var 68 string/ipol 47 string/tr 54 AVERAGE 56 =F2=C5=DA=D5=CC=D8=D4=C1=D4=D9 =C4=CC=D1 -Os: arith/mixed 38 arith/trig 50 array/copy 115 array/foreach 46 array/index 60 array/pop 69 array/shift 69 array/sort-num 87 array/sort 48 call/0arg 71 call/1arg 69 call/2arg 65 call/9arg 103 call/empty 45 call/fib 74 call/method 70 call/wantarray 97 hash/copy 103 hash/each 91 hash/foreach-sort 51 hash/foreach 63 hash/get 42 hash/set 44 loop/for-c 41 loop/for-range-const 75 loop/for-range 50 loop/getline 76 loop/while-my 49 loop/while 45 re/const 60 re/w 49 startup/fewmod 10 startup/lotsofsub 25 startup/noprog 15 string/base64 135 string/htmlparser 108 string/index-const 99 string/index-var 85 string/ipol 54 string/tr 67 AVERAGE 65 =E2=CF=CC=D8=DB=C5=C5 =DE=C9=D3=CC=CF avarage =D3=CF=CF=D4=D7=C5=D4=D3=D4= =D7=D5=C5=D4 =C2=CF=CC=C5=C5 =C2=D9=D3=D4=D2=CF=CD=D5 =D0=C5=D2=CC=D5. =F0= =D2=C9 =D3=C2=CF=D2=CB=C5 =D3 -Os =D0=D2=C9=D2=CF=D3=D4 =D0=D2=CF=C9=DA=D7=CF=C4=C9=D4=C5=CC=D8=CE=CF= =D3=D4=C9 =C2=CF=CC=C5=C5 10%. =E4=C1=CC=C5=C5, =D2=D5=CB=CF=D7=CF=C4=D3=D4=D7=D5=D1=D3=D8 =CE=C5=CB=CF=D4= =CF=D2=D9=CD=C9 =D3=CF=CF=C2=D2=C1=D6=C5=CE=C9=D1=CD=C9, =D1 =D3=CF=C2=D2= =C1=CC pp_hot.o =D3 =CF=D0=D4=C9=CD=C9=DA=C1=C3=C9=C5=CA -O2, =C1 =D7=D3=A3 =CF=D3=D4=C1=CC=D8= =CE=CF=C5 =D3 -Os (=D7 =C6=C1=CA=CC=C5 pp_hot.o =CE=C1=C8=CF=C4=D1=D4=D3=D1 =CE=C1=C9=C2=CF=CC=C5=C5 =DE=C1=D3=D4=CF =C9=D3=D0=CF=CC=D8=DA=D5=C5=CD=D9= =C5 =D7=CE=D5=D4=D2=C5=CE=CE=C9=C5 =C6=D5=CE=CB=C3=C9=C9). =F7=CF=D4 =D2= =C5=DA=D5=CC=D8=D4=C1=D4: arith/mixed 37 arith/trig 49 array/copy 119 array/foreach 43 array/index 64 array/pop 60 array/shift 62 array/sort-num 74 array/sort 41 call/0arg 68 call/1arg 66 call/2arg 62 call/9arg 98 call/empty 46 call/fib 73 call/method 67 call/wantarray 88 hash/copy 99 hash/each 85 hash/foreach-sort 47 hash/foreach 58 hash/get 39 hash/set 44 loop/for-c 41 loop/for-range-const 79 loop/for-range 51 loop/getline 76 loop/while-my 47 loop/while 46 re/const 52 re/w 52 startup/fewmod 10 startup/lotsofsub 24 startup/noprog 13 string/base64 129 string/htmlparser 105 string/index-const 89 string/index-var 80 string/ipol 51 string/tr 66 AVERAGE 63 =F7=C9=C4=CE=CF, =DE=D4=CF =D2=C5=DA=D5=CC=D8=D4=C1=D4 =CE=C5=D3=CB=CF=CC= =D8=CB=CF =D5=C8=D5=C4=DB=C9=CC=D3=D1. =EF=D4=D3=C0=C4=C1 =CD=CF=D6=CE=CF = =D3=C4=C5=CC=C1=D4=D8 =D7=D9=D7=CF=C4, =DE=D4=CF =D0=D2=C1=CB=D4=C9=DE=C5=D3=CB=C9 =C2=C5=DA =C9=D3=CB=CC=C0=DE=C5= =CE=C9=CA =D7=C5=D3=D8 =D0=C5=D2=CC=CF=D7=D9=CA =CB=CF=C4 =D7=D9=C7=CF=C4= =CE=C5=C5 =CB=CF=CD=D0=C9=CC=C9=D2=CF=D7=C1=D4=D8 =D3 -Os, =C1 =CE=C5 =D3 -O2. =F3=D7=CF=C5=C7=CF =D2=CF=C4=C1 =CF=C2=DF=D1=D3=CE=C5=CE=C9=C5 =D0=CF=CC=D5= =DE=C5=CE=CE=D9=CD =D2=C5=DA=D5=CC=D8=D4=C1=D4=C1=CD =CD=CF=D6=CE=CF =D0=D2= =CF=DE=C9=D4=C1=D4=D8 =DA=C4=C5=D3=D8: http://www.faqs.org/docs/artu/ch12s03.html "The most effective way to optimize your code is to keep it small and simple." =FC=D4=CF =CB=C1=D3=C1= =C5=D4=D3=D1 =D7 =D4=CF=CD =DE=C9=D3=CC=C5 =C9 =C2=C9=CE=C1=D2=CE=CF=C7=CF =CB=CF=C4=C1. (=E4=C1=CC= =C5=C5 =D0=D2=C9=D7=CF=C4=C9=D4=D3=D1 =D0=D2=C1=D7=C4=CF=D0=CF=C4=CF=C2=CE= =CF=C5 =D3 =D4=C5=C8=CE=C9=DE=C5=D3=CB=CF=CA =D4=CF=DE=CB=C9 =DA=D2=C5=CE=C9=D1 =CF=C2=DF=D1=D3=CE=C5=CE=C9=C5: "Process= or cycles are almost free", =C1 =CC=C0=C2=CF=C5 =CE=C5=D0=CF=D0=C1=C4=C1=CE=C9=C5 =D7 =CB=C5=DB =D3=D7=CF=C4=C9=D4 =CE=C1 = =CE=C5=D4 =D7=D3=A3 =CF=D0=D4=C9=CD=C9=DA=C1=C3=C9=C0 =D0=CF =D0=C5=D2=C5= =D5=D0=CF=D2=D1=C4=CF=DE=C9=D7=C1=CE=C9=C0 =C9=CE=D3=D4=D2=D5=CB=C3=C9=CA). --EXKGNeO8l0xGFBjy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFEcfuhfBKgtDjnu0YRAqlAAKCa50VZokiyad3CD+d8lvTR+oEL9gCgjhgo REOGjRGipOs6t9yn7wkg5Po= =z6kn -----END PGP SIGNATURE----- --EXKGNeO8l0xGFBjy--