:If you can quantify this, it is something we can pass on to the GCC
:folks.  They are rather receptive right now due to wanting GCC 3.1.1 to
:be very high quality.  Run-time of the compiler isn't anything that can
:be fixed right now -- but if you show how small (but not 3 line trivial)
:programs run slower that would be of interest.

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>

    Just play with a couple of interpreted languages, like csh, perl,
    etc...  run the same program compiled with GCC2 and again with GCC3
    doing something cpu-bound, like a loop.

#!bin/csh -f
#

set history = 0
set i = 0
while ($i < 10000)
    @ i = $i + 1
end

        (csh built with GCC2, -O3)
    test3:/home/dillon> time ./x.csh
    0.832u 0.848s 0:01.68 99.4%     881+645k 0+0io 0pf+0w
    test3:/home/dillon> time ./x.csh
    0.926u 0.755s 0:01.68 99.4%     889+654k 0+0io 0pf+0w

        (csh built with GCC3, -O3)
    test3:/home/dillon> time ./x.csh
    0.950u 0.693s 0:01.64 100.0%    900+648k 0+0io 0pf+0w
    test3:/home/dillon> time ./x.csh
    0.810u 0.833s 0:01.64 100.0%    900+648k 0+0io 0pf+0w

        (csh built with GCC3, -O)
    test3:/home/dillon> time ./x.csh
    0.779u 0.904s 0:01.68 99.4%     760+641k 0+0io 0pf+0w
    test3:/home/dillon> time ./x.csh
    0.817u 0.864s 0:01.68 99.4%     760+641k 0+0io 0pf+0w

    I also ran tests with some of my own code and got similar results.
    GCC3-compiled binaries do not appear to improve the performance of
    anything, at least not on a Pentium III, and yet we know from experience
    the the absolute best commercial compilers for IA32 can get 50-100% more
    performance (at least from the few postings to the lists where people
    have compared timing results).

    I get just about the same performance for GCC2 as I do for GCC3 in
    the tests I've run so far.  It makes me wonder what the hell GCC3 is
    burning all that cpu *on*.

                                                        -Matt


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to