Subject: Re: egcs 1.1 vs gcc 2.7.2.2 (speed of code)
To: None <current-users@netbsd.org>
From: Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: current-users
Date: 11/18/1998 20:58:40
In message <Pine.NEB.4.05.9811181346270.5875-100000@duhnet.net>
          Todd Vierling <tv@pobox.com> wrote:

> C or C++?  Inlines involved?  What optimization level?
Only C. Haven't played with optimizations: Only -O and -O2, since my
world isn't built with anything else. =20

To be more precise: I benchmarked my whole system freshly rebuild
yesterday with the byte-benchmark (in pkgsrc/benchmark). Then I compared
the results with a test run I did October. FYI here are the numbers:

Date:                                      24 Oct         yesterday
World/Benchmark built with:               gcc 2.7.2.2  egcs 1.1.1pre
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Dhrystone 2 without register variables   600365.2 lps   572745.7 lps =20
Dhrystone 2 using register variables     600511.9 lps   572952.2 lps =20
Arithmetic Test (type =3D arithoh)        1390981.9 lps  1390187.5 lps=20
Arithmetic Test (type =3D register)         82881.7 lps    82736.2 lps =20
Arithmetic Test (type =3D short)            74564.2 lps    85151.6 lps =20
Arithmetic Test (type =3D int)              82880.3 lps    82733.2 lps =20
Arithmetic Test (type =3D long)             82894.9 lps    82755.6 lps =20
Arithmetic Test (type =3D float)            55671.7 lps    54638.6 lps =20
Arithmetic Test (type =3D double)           55670.2 lps    54632.0 lps =20
System Call Overhead Test                168337.1 lps   145078.4 lps =20
Pipe Throughput Test                     126769.3 lps   125257.8 lps =20
Pipe-based Context Switching Test         30459.4 lps    29625.3 lps =20
Process Creation Test                       898.9 lps      906.4 lps =20
Execl Throughput Test                       294.0 lps      304.4 lps =20
File Read  (10 seconds)                  263007.0 KBps  279730.0 KBps=20
File Write (10 seconds)                    6463.0 KBps    6716.0 KBps=20
File Copy  (10 seconds)                    9628.0 KBps    9137.0 KBps=20
File Read  (30 seconds)                  263769.0 KBps  275780.0 KBps=20
File Write (30 seconds)                    7799.0 KBps    7711.0 KBps=20
File Copy  (30 seconds)                    8123.0 KBps    6998.0 KBps=20
C Compiler Test                             449.4 lpm      299.9 lpm =20
Shell scripts (1 concurrent)                686.4 lpm      676.1 lpm =20
Shell scripts (2 concurrent)                363.7 lpm      360.4 lpm =20
Shell scripts (4 concurrent)                169.7 lpm      183.0 lpm =20
Shell scripts (8 concurrent)                 89.0 lpm       91.3 lpm =20
Dc: sqrt(2) to 99 decimal places          11584.6 lpm    11661.9 lpm =20
Recursion Test--Tower of Hanoi             9434.9 lps     8934.1 lps =20
                                                                     =20
 INDEX VALUES                                                     =20
TEST                                            INDEX          INDEX
Arithmetic Test (type =3D double)                  21.9           21.5
Dhrystone 2 without register variables           26.8           25.6
Execl Throughput Test                            17.8           18.4=20
File Copy  (30 seconds)                          45.4           39.1=20
Pipe-based Context Switching Test                23.1           22.5=20
Shell scripts (8 concurrent)                     22.2           22.8=20
 =3D=3D=3D=3D=3D=3D=3D=3D=3D                                             =
           =20
 SUM of  6 items                                157.3          149.9=20
 AVERAGE                                         26.2           25.0=20

(I can rerun the test this night, if you like, since I and my world are
 back to gcc now.)


To be shure, it's the compiler and not some changes in the source tree,
I run the hint benchmark, reinstalled gcc, recompiled and run hint again:=

(again default optimization, -O2 IIRC)

egcs:  6085099.717345 net QUIPs=20
gcc:   6285052.301817 net QUIPs

> egcs allows for much more performance tuning, as well as includes lots =
of
> C++ support not in gcc 2.7.  It also is more robust in some areas.
But if I am building my userland with egcs I don't benefit from this, do =
I?

Bye,
  Thilo.
--=20
Mir ist mein Signature entlaufen :-(. Wer es findet, sende es bitte an
Thilo.Manske@HEH.Uni-Oldenburg.DE zur=FCck. Danke!=20