Well, I played around with egcs a bit.  I had blown away my original gcc
    install so I couldn't compare egcs w/ gcc, but I did mess around with
    egcs's optimization options.

    My conclusion:  Don't bother with -mpentiumpro or -march=pentiumpro.
    Not only do they not result in better performance, -march=pentiumpro
    will not run on a K6-2.  I dunno about a K6-3.  -m<cpu> does not change
    the assembly output at all.  -march=<cpu> does change the assembly output,
    but does not appear to result in any noticeable improvement in performance
    over not using -m at all.

    However, -Os does seem to produce slightly smaller binaries compared with
    -O2 and actually does not appear to cost performance on my PPro-200.

        before

        -r--r--r--  1 root  wheel  543096 Apr  5 21:29 /usr/lib/libc.so.3
        -r-xr-xr-x  1 root  wheel  1517032 Apr  5 20:37 /usr/libexec/cc1
        -r-xr-xr-x  1 root  wheel  1580456 Apr  5 20:37 /usr/libexec/cc1obj
        -r-xr-xr-x  1 root  wheel  1928112 Apr  5 20:37 /usr/libexec/cc1plus

        after

        -r--r--r--  1 root  wheel  538872 Apr  5 21:35 /usr/lib/libc.so.3
        -r-xr-xr-x  1 root  wheel  1479240 Apr  5 21:47 /usr/libexec/cc1
        -r-xr-xr-x  1 root  wheel  1538376 Apr  5 21:47 /usr/libexec/cc1obj
        -r-xr-xr-x  1 root  wheel  1876464 Apr  5 21:47 /usr/libexec/cc1plus

    Compiling up /usr/src/usr.sbin with egcs and libc compiled with:

        -O2                             160 seconds
        -O2 -march=pentiumpro           162 seconds
        -Os                             161 seconds

    Which leads me to believe that using -Os might be beneficial.

                                                -Matt



To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to