199767f8919635c4928607450d9e0abb932109ceToomas SoomeThis is a patched version of zlib, modified to use
199767f8919635c4928607450d9e0abb932109ceToomas SoomePentium-Pro-optimized assembly code in the deflation algorithm. The
199767f8919635c4928607450d9e0abb932109ceToomas Soomefiles changed/added by this patch are:
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeREADME.686
199767f8919635c4928607450d9e0abb932109ceToomas Soomematch.S
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeThe speedup that this patch provides varies, depending on whether the
199767f8919635c4928607450d9e0abb932109ceToomas Soomecompiler used to build the original version of zlib falls afoul of the
199767f8919635c4928607450d9e0abb932109ceToomas SoomePPro's speed traps. My own tests show a speedup of around 10-20% at
199767f8919635c4928607450d9e0abb932109ceToomas Soomethe default compression level, and 20-30% using -9, against a version
199767f8919635c4928607450d9e0abb932109ceToomas Soomecompiled using gcc 2.7.2.3. Your mileage may vary.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeNote that this code has been tailored for the PPro/PII in particular,
199767f8919635c4928607450d9e0abb932109ceToomas Soomeand will not perform particuarly well on a Pentium.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeIf you are using an assembler other than GNU as, you will have to
199767f8919635c4928607450d9e0abb932109ceToomas Soometranslate match.S to use your assembler's syntax. (Have fun.)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeBrian Raiter
199767f8919635c4928607450d9e0abb932109ceToomas Soomebreadbox@muppetlabs.com
199767f8919635c4928607450d9e0abb932109ceToomas SoomeApril, 1998
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeAdded for zlib 1.1.3:
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeThe patches come from
199767f8919635c4928607450d9e0abb932109ceToomas Soomehttp://www.muppetlabs.com/~breadbox/software/assembly.html
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeTo compile zlib with this asm file, copy match.S to the zlib directory
199767f8919635c4928607450d9e0abb932109ceToomas Soomethen do:
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS="-O3 -DASMV" ./configure
199767f8919635c4928607450d9e0abb932109ceToomas Soomemake OBJA=match.o
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeUpdate:
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeI've been ignoring these assembly routines for years, believing that
199767f8919635c4928607450d9e0abb932109ceToomas Soomegcc's generated code had caught up with it sometime around gcc 2.95
199767f8919635c4928607450d9e0abb932109ceToomas Soomeand the major rearchitecting of the Pentium 4. However, I recently
199767f8919635c4928607450d9e0abb932109ceToomas Soomelearned that, despite what I believed, this code still has some life
199767f8919635c4928607450d9e0abb932109ceToomas Soomein it. On the Pentium 4 and AMD64 chips, it continues to run about 8%
199767f8919635c4928607450d9e0abb932109ceToomas Soomefaster than the code produced by gcc 4.1.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeIn acknowledgement of its continuing usefulness, I've altered the
199767f8919635c4928607450d9e0abb932109ceToomas Soomelicense to match that of the rest of zlib. Share and Enjoy!
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeBrian Raiter
199767f8919635c4928607450d9e0abb932109ceToomas Soomebreadbox@muppetlabs.com
199767f8919635c4928607450d9e0abb932109ceToomas SoomeApril, 2007