[Zlib-devel] Inflate 1.2beta3 available for testing

Chris Anderson christop at fellspt.charm.net
Thu Dec 26 20:05:01 EST 2002


I stopped by the zlib-devel list because I was trying to figure out how to
decode gzip http content-encoding with zlib.  I ended up copying the
gzio.c gzip header skipping code into my application.  Along the way I
found the performance tests thread and decided to give 1.3beta a try.  My
test application uses a c++ stream class not unlike java's InputStream
class.

System: redhat 8.0
Kernel: 2.4.18-14
Processor: 866mhz p3 L2=256K
Memory: 640Mb
1720.95 BogoMIPS

$ cat *.htm* | gzip -9 > test.gz
$ ls -l test.gz
-rw-r--r--    1 chris    chris    143659592 Dec 26 10:53 test.gz

$ gunzip < test.gz | wc -c
433912097

As a comparison, here is a time gunzip from the redhat 8.0 distribution.
$ time gunzip < test.gz > /dev/null

real    0m14.583s
user    0m13.355s
sys     0m0.768s

$ gunzip --version
gunzip 1.3.3
(2002-03-08)
...
Compilation options:
DIRENT UTIME STDC_HEADERS HAVE_UNISTD_H HAVE_MEMORY_H HAVE_STRING_H
HAVE_LSTAT

I'm currently using icc until g++ v3 and gdb work together again, gdb has
problems with g++ namespace and template debug symbols.

$ icc -V
Intel(R) C++ Compiler for 32-bit applications, Version 6.0.1 Build
20020822Z

zbuflen     is size of buffer used with stream.avail_in
zbuflen * 4 is size of buffer used with stream.avail_out
clock       is from clock()
time        is from gettimeofday()

Tests were run in a shell script one right after another, like this:
$ a.out [zbuflen] < test.gz > /dev/null

zlib-1.1.4 + infnew-3, linking with my application
Compiled icc -O3 -tpp6 -DHAVE_UNISTD_H -DUSE_MMAP -DASMV -DNO_UNDERLINE
         with profile feedback optimization (-prof_genx / -prof_use)
zbuflen    128, clock 18.260, time 19.751
zbuflen    128, clock 18.290, time 18.897
zbuflen    256, clock 16.920, time 17.360
zbuflen    256, clock 16.940, time 17.392
zbuflen    512, clock 15.300, time 15.796
zbuflen    512, clock 15.340, time 16.912
zbuflen   1024, clock 14.370, time 14.827
zbuflen   1024, clock 14.400, time 14.861
zbuflen   2048, clock 13.860, time 14.310
zbuflen   2048, clock 13.890, time 14.315
zbuflen   4096, clock 13.650, time 14.080
zbuflen   4096, clock 13.620, time 14.073
zbuflen   8192, clock 13.440, time 14.422
zbuflen   8192, clock 13.430, time 13.857
zbuflen  16384, clock 13.480, time 13.960
zbuflen  16384, clock 13.520, time 13.965
zbuflen  32768, clock 13.430, time 13.913
zbuflen  32768, clock 13.500, time 13.960
zbuflen  65536, clock 14.410, time 15.861
zbuflen  65536, clock 14.510, time 15.014
zbuflen 131072, clock 15.680, time 16.222
zbuflen 131072, clock 15.750, time 16.270

zlib-1.1.4 + infnew-3/minigzip, icc -O3 -tpp6 compiled and stripped, it
uses a gzread() bufsize of 16K
$ time minigzip -d < test.gz > /dev/null

real    0m14.186s
user    0m12.508s
sys     0m1.201s

zlib-1.1.4, linking with my application
Compiled icc -O3 -tpp6 -DHAVE_UNISTD_H -DUSE_MMAP -DASMV -DNO_UNDERLINE
         with profile feedback optimization (-prof_genx / -prof_use)
zbuflen    128, clock 16.500, time 17.027
zbuflen    128, clock 16.460, time 16.976
zbuflen    256, clock 14.790, time 16.348
zbuflen    256, clock 14.810, time 15.279
zbuflen    512, clock 14.220, time 14.705
zbuflen    512, clock 14.290, time 14.781
zbuflen   1024, clock 13.870, time 14.343
zbuflen   1024, clock 13.850, time 14.327
zbuflen   2048, clock 13.590, time 14.084
zbuflen   2048, clock 13.570, time 15.286
zbuflen   4096, clock 13.510, time 14.011
zbuflen   4096, clock 13.520, time 14.009
zbuflen   8192, clock 13.710, time 14.219
zbuflen   8192, clock 13.540, time 14.040
zbuflen  16384, clock 13.850, time 14.349
zbuflen  16384, clock 13.880, time 15.491
zbuflen  32768, clock 14.920, time 15.427
zbuflen  32768, clock 15.060, time 15.615
zbuflen  65536, clock 16.320, time 16.893
zbuflen  65536, clock 16.210, time 16.798
zbuflen 131072, clock 17.560, time 18.150
zbuflen 131072, clock 17.580, time 19.232

/usr/lib/libz.so.1.1.4 with my application (redhat 8.0 distribution)
zbuflen    128, clock 18.620, time 19.137
zbuflen    128, clock 18.690, time 19.208
zbuflen    256, clock 16.960, time 17.441
zbuflen    256, clock 16.940, time 17.437
zbuflen    512, clock 16.200, time 17.774
zbuflen    512, clock 16.180, time 16.688
zbuflen   1024, clock 15.780, time 16.292
zbuflen   1024, clock 15.800, time 16.318
zbuflen   2048, clock 15.530, time 15.968
zbuflen   2048, clock 15.500, time 15.990
zbuflen   4096, clock 15.400, time 16.957
zbuflen   4096, clock 15.380, time 15.904
zbuflen   8192, clock 15.480, time 15.987
zbuflen   8192, clock 15.530, time 16.040
zbuflen  16384, clock 15.820, time 16.357
zbuflen  16384, clock 15.680, time 16.186
zbuflen  32768, clock 17.100, time 18.682
zbuflen  32768, clock 16.700, time 17.267
zbuflen  65536, clock 18.110, time 18.693
zbuflen  65536, clock 18.150, time 18.715
zbuflen 131072, clock 19.450, time 20.108
zbuflen 131072, clock 19.470, time 21.111

I also tried -DPOSTINC, but didn't notice much of a difference, so any
improvements were probably lost in the noise.





More information about the Zlib-devel mailing list