Kon Lovett wrote:
Hi,

Attached are Chicken benchmark results for a -Os & a -O3 build of the same Chicken source.

Well, YMMV seems to be the overall picture for the benchmarks. The reduction in binary size is ~10%.

Apple's XCode, their buildtool, uses -Os as the default release optimization flag, & they should know :-).


They should know what?  Your benchmarks indicate that -O3 is a hair faster than -Os.  As you said above, the -Os binaries are a hair smaller.  What do people value, things being a hair faster or a hair smaller?  I do know that 10% size reductions don't sell anything, whereas little improvements in performance can edge out competitors in Shootout benchmarks.

There is of course the entire matrix of all versions of GCC on all OSes and all CPUs with all the various possible compiler flags.  Are there any portions of that search space that show significant differences?  I'm not going to get into it, it's a lot of work.  I learned back at DEC that you have to spend most of your time coding, not benchmarking.  All an optimization jock ever does is develop heuristics about what really improves the speed of code, and then occasionally check that his assumptions are valid.


Cheers,
Brandon Van Every





./csc benchmarks/cscbench.scm -o benchmarks/cscbench -compiler ./chicken cd benchmarks; ./cscbench

  ___| |    _)      |               
 |     __ \  |  __| |  /  _ \ __ \  
 |     | | | | (      <   __/ |   | 
\____|_| |_|_|\___|_|\_\\___|_|  _| 

Version 2, Build 429 - macosx-unix-gnu-ppc - [ libffi dload ptables applyhook ]
(c)2000-2006 Felix L. Winkelmann

CC:
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5363.obj~28/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5363)

CFLAGS:
-DHAVE_CHICKEN_CONFIG_H -Os -mcpu=7450 -mtune=G4 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -DHAVE_ALLOCA_H -DC_ENABLE_PTABLES -no-cpp-precomp -DC_NO_PIC_NO_DLL

                    base      unsafe        max
boyer               0.276      0.180      0.189
browse              0.284      0.201      0.194
conform             0.554      0.250      0.239
cpstak              1.494      1.246      0.844
ctak                0.932      0.787      0.755
dderiv              0.475      0.372      0.343
deriv               0.373      0.302      0.281
destructive         0.482      0.446      0.235
div-iter            0.121      0.083      0.008
div-rec             0.301      0.172      0.175
dynamic             0.343      0.024      0.232
earley              0.068      0.068      0.052
fft                 0.120      0.116  
fib                 0.814      0.065      0.104
fibc               10.052      6.067      4.166
fprint              0.005      0.005      0.005
fread               0.025      0.024      0.023
hanoi               2.148      1.997      0.405
lattice            27.379     20.294     20.092
maze                0.713      0.416  
nqueens             0.011      0.009      0.004
puzzle              0.252      0.199      0.136
scheme              0.081      0.005      0.046
tak                 1.504      1.028      0.239
takl                0.849      0.181      0.181
takr                2.802      1.766      1.389
traverse            1.715      0.814      0.843
travinit            0.247      0.192      0.067
triangl             3.215      2.258      2.046

-rwxr-xr-x   1 klovett  admin  1487092 Sep  7 07:08 /usr/local/bin/chicken*
-rwxr-xr-x   1 klovett  admin    42164 Sep  7 07:08 /usr/local/bin/chicken-profile*
-rwxr-xr-x   1 klovett  admin   401748 Sep  7 07:08 /usr/local/bin/chicken-setup*
-rwxr-xr-x   1 klovett  admin  3325776 Sep  7 07:08 /usr/local/bin/chicken-static*
-rwxr-xr-x   1 klovett  admin  2677716 Sep  7 07:08 /usr/local/lib/libchicken.0.0.0.dylib*
lrwxr-xr-x   1 klovett  admin       22 Sep  7 07:08 /usr/local/lib/libchicken.0.dylib@ -> libchicken.0.0.0.dylib
-rw-r--r--   1 klovett  admin  4225368 Sep  7 07:08 /usr/local/lib/libchicken.a
lrwxr-xr-x   1 klovett  admin       22 Sep  7 07:08 /usr/local/lib/libchicken.dylib@ -> libchicken.0.0.0.dylib
-rwxr-xr-x   1 klovett  admin      879 Sep  7 07:08 /usr/local/lib/libchicken.la*
-rwxr-xr-x   1 klovett  admin  2373856 Sep  7 07:08 /usr/local/lib/libuchicken.0.0.0.dylib*
lrwxr-xr-x   1 klovett  admin       23 Sep  7 07:08 /usr/local/lib/libuchicken.0.dylib@ -> libuchicken.0.0.0.dylib
-rw-r--r--   1 klovett  admin  3699712 Sep  7 07:08 /usr/local/lib/libuchicken.a
lrwxr-xr-x   1 klovett  admin       23 Sep  7 07:08 /usr/local/lib/libuchicken.dylib@ -> libuchicken.0.0.0.dylib
-rwxr-xr-x   1 klovett  admin      886 Sep  7 07:08 /usr/local/lib/libuchicken.la*
  





./csc benchmarks/cscbench.scm -o benchmarks/cscbench -compiler ./chicken cd benchmarks; ./cscbench ___| | _) | | __ \ | __| | / _ \ __ \ | | | | | ( < __/ | | \____|_| |_|_|\___|_|\_\\___|_| _| Version 2, Build 429 - macosx-unix-gnu-ppc - [ libffi dload ptables applyhook ] (c)2000-2006 Felix L. Winkelmann CC: Using built-in specs. Target: powerpc-apple-darwin8 Configured with: /private/var/tmp/gcc/gcc-5363.obj~28/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8 Thread model: posix gcc version 4.0.1 (Apple Computer, Inc. build 5363) CFLAGS: -DHAVE_CHICKEN_CONFIG_H -O3 -mcpu=7450 -mtune=G4 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -DHAVE_ALLOCA_H -DC_ENABLE_PTABLES -no-cpp-precomp -DC_NO_PIC_NO_DLL base unsafe max boyer 0.261 0.181 0.176 browse 0.257 0.188 0.188 conform 0.053 0.223 0.246 cpstak 1.445 1.266 0.859 ctak 0.894 0.787 0.757 dderiv 0.463 0.332 0.359 deriv 0.336 0.268 0.252 destructive 0.480 0.444 0.242 div-iter 0.122 0.081 0.082 div-rec 0.289 0.179 0.177 dynamic 0.324 0.241 0.230 earley 0.072 0.060 0.053 fft 0.119 0.111 fib 0.819 0.635 0.104 fibc 9.536 6.176 4.199 fprint 0.005 0.004 0.005 fread 0.025 0.023 0.022 hanoi 2.154 2.016 0.405 lattice 26.856 20.028 20.278 maze 0.654 0.408 nqueens 0.011 0.009 0.004 puzzle 0.254 0.196 0.131 scheme 0.075 0.052 0.047 tak 1.465 1.247 0.238 takl 0.771 0.180 0.018 takr 2.753 1.728 1.395 traverse 1.631 0.848 0.859 travinit 0.257 0.197 0.070 triangl 3.040 2.260 1.834 -rwxr-xr-x 1 klovett admin 1552628 Sep 4 08:03 /usr/local/bin/chicken* -rwxr-xr-x 1 klovett admin 42164 Sep 4 08:03 /usr/local/bin/chicken-profile* -rwxr-xr-x 1 klovett admin 414036 Sep 4 08:03 /usr/local/bin/chicken-setup* -rwxr-xr-x 1 klovett admin 3559588 Sep 4 08:03 /usr/local/bin/chicken-static* -rwxr-xr-x 1 klovett admin 2891388 Sep 4 08:03 /usr/local/lib/libchicken.0.0.0.dylib* lrwxr-xr-x 1 klovett admin 22 Sep 4 08:03 /usr/local/lib/libchicken.0.dylib@ -> libchicken.0.0.0.dylib -rw-r--r-- 1 klovett admin 4581944 Sep 4 08:03 /usr/local/lib/libchicken.a lrwxr-xr-x 1 klovett admin 22 Sep 4 08:03 /usr/local/lib/libchicken.dylib@ -> libchicken.0.0.0.dylib -rwxr-xr-x 1 klovett admin 879 Sep 4 08:03 /usr/local/lib/libchicken.la* -rwxr-xr-x 1 klovett admin 2602992 Sep 4 08:03 /usr/local/lib/libuchicken.0.0.0.dylib* lrwxr-xr-x 1 klovett admin 23 Sep 4 08:03 /usr/local/lib/libuchicken.0.dylib@ -> libuchicken.0.0.0.dylib -rw-r--r-- 1 klovett admin 4087824 Sep 4 08:03 /usr/local/lib/libuchicken.a lrwxr-xr-x 1 klovett admin 23 Sep 4 08:03 /usr/local/lib/libuchicken.dylib@ -> libuchicken.0.0.0.dylib -rwxr-xr-x 1 klovett admin 886 Sep 4 08:03 /usr/local/lib/libuchicken.la*

_______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users

_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to