------------------------------------------------------------------------------ 1. Unpack p7zip_4.55_src_all.tar.bz2 2. Edit CPP/7zip/Bundles/Alone/makefile adding LOCAL_FLAGS+=-O3 -fomit-frame-pointer -march=i686 -msse3 3. time make 4. strip --strip-all bin/7za ; ls -l bin/7za ; size bin/7za 5. time dd if=/dev/zero bs=4k count=8k | ./bin/7za a -t7z -m0=lzma -mx=9 \ -mfb=273 -md=48m -ms=on -si trash.7z ; ls -l *7z # User's time is used, machine is Ath64 3200+ 2.0 GHz x1, 64+64K L1, 512K L2. # Every compilers are compiled with this configure ../configure --prefix=/opt/gcc????????? --disable-shared \ --disable-threads --disable-checking --enable-__cxa_atexit \ --enable-languages=c,c++,fortran,objc --enable-bootstrap ------------------------------------------------------------------------------ 1. gcc-3.4.6 ------------------------------------------------------------------------------ 2. gcc-4.1.3-20071029 export PATH=/opt/gcc41320071029/bin:$PATH export LD_LIBRARY_PATH=/opt/gcc41320071029/lib ------------------------------------------------------------------------------ 3. gcc-4.2.3-20071031 export PATH=/opt/gcc42320071031/bin:$PATH export LD_LIBRARY_PATH=/opt/gcc42320071031/lib ------------------------------------------------------------------------------ 4. gcc-4.3.0-20071026 export PATH=/opt/gcc43020071026/bin:$PATH export LD_LIBRARY_PATH=/opt/gcc43020071026/lib ------------------------------------------------------------------------------ LOCAL_FLAGS+=-O3 -fomit-frame-pointer -march=i686 -msse3
1. 1m24s compile, 1184180 file, 1172634 text, 6124 data, 27168 bss, 0m17s run. 2. 1m30s compile, 1204640 file, 1188955 text, 4684 data, 29160 bss, 0m25s run. 3. 1m44s compile, 1208640 file, 1192995 text, 4688 data, 29128 bss, 0m22s run. 4. 1m45s compile, 1336068 file, 1319986 text, 4396 data, 29128 bss, 0m52s run. ------------------------------------------------------------------------------ LOCAL_FLAGS+=-O3 -fomit-frame-pointer -march=i686 -msse3 \ -funroll-all-loops -finline-functions 1. 1m46s compile, 1731956 file, 1720453 text, 6124 data, 27168 bss, 0m12s run. 2. 1m51s compile, 1762528 file, 1746859 text, 4684 data, 29160 bss, 0m15s run. 3. 2m06s compile, 1779040 file, 1763367 text, 4688 data, 29128 bss, 0m18s run. 4. 2m35s compile, 2287204 file, 2271122 text, 4396 data, 29128 bss, 0m17s run. ------------------------------------------------------------------------------ LOCAL_FLAGS+=-O3 -fomit-frame-pointer -march=i686 -msse3 \ -funroll-loops -finline-functions 1. 1m42s compile, 1628564 file, 1617041 text, 6124 data, 27168 bss, 0m12s run. 2. 1m47s compile, 1627328 file, 1611675 text, 4684 data, 29160 bss, 0m15s run. 3. 2m00s compile, 1595072 file, 1579407 text, 4688 data, 29128 bss, 0m18s run. 4. 2m26s compile, 2108964 file, 2092866 text, 4396 data, 29128 bss, 0m17s run. ------------------------------------------------------------------------------ LOCAL_FLAGS+=-O2 -fomit-frame-pointer -march=i686 -msse3 \ -funroll-loops -finline-functions 1. 1m37s compile, 1564884 file, 1553374 text, 6124 data, 27168 bss, 0m13s run. 2. 1m45s compile, 1625152 file, 1609475 text, 4684 data, 29160 bss, 0m15s run. 3. 1m58s compile, 1593280 file, 1577599 text, 4688 data, 29128 bss, 0m18s run. 4. 1m52s compile, 1623044 file, 1606958 text, 4396 data, 29128 bss, 0m17s run. ------------------------------------------------------------------------------ LOCAL_FLAGS+=-Os -fomit-frame-pointer -march=i686 -msse3 \ -funroll-loops -finline-functions 1. 1m34s compile, 1506228 file, 1494339 text, 6124 data, 27168 bss, 0m13s run. 2. 1m05s compile, 879552 file, 863302 text, 4680 data, 29224 bss, 0m27s run. 3. 1m15s compile, 869624 file, 854430 text, 4228 data, 28996 bss, 0m25s run. 4. 1m08s compile, 957428 file, 941816 text, 3932 data, 28900 bss, 0m21s run. ------------------------------------------------------------------------------ Summary: -------- The best compiler for p7zip-4.55 is gcc-3.4.6 and its best option is -O3 -fomit-frame-pointer -march=i686 -msse3 -funroll-loops -finline-functions The compile's and run's time of gcc-3.4.6 is the fastest, and i don't know why the modern gcc4's family is little bit slower than the older gcc3's family. The gcc-4.3 snapshot is worse than gcc-4.2/gcc-4.1 in the code generation, due to its bad code size (~2.3MB) and sometimes long run time (52s). ------------------------------------------------------------------------------ J.C. Pizarro