components/zlib/patches/perf.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 29 Aug 2012 11:05:56 -0700
changeset 957 255465c5756f
parent 825 78809aba88fe
child 1945 3dc1935a2189
permissions -rw-r--r--
Close of build 04.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
825
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
     1
--- zlib-1.2.3/zlib.h.orig   Sun Jul 17 19:26:49 2005
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
     2
+++ zlib-1.2.3/zlib.h        Tue May 22 10:17:54 2012
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
     3
@@ -37,8 +37,8 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
     4
 extern "C" {
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
     5
 #endif
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
     6
 
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
     7
-#define ZLIB_VERSION "1.2.3"
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
     8
-#define ZLIB_VERNUM 0x1230
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
     9
+#define ZLIB_VERSION "1.2.3-T4mods"
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    10
+#define ZLIB_VERNUM 0x123f
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    11
 
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    12
 /*
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    13
      The 'zlib' compression library provides in-memory compression and
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    14
--- zlib-1.2.3/Makefile.in.orig	Mon May 14 14:29:35 2012
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    15
+++ zlib-1.2.3/Makefile.in	Mon May 14 14:30:29 2012
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    16
@@ -77,8 +77,8 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    17
 	mv _match.o match.o
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    18
 	rm -f _match.s
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    19
 
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    20
-$(SHAREDLIBV): $(OBJS)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    21
-	$(LDSHARED) -o [email protected] $(OBJS)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    22
+$(SHAREDLIBV): $(OBJS) $(PIC_OBJS)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    23
+	$(LDSHARED) -o [email protected] $(OBJS) $(PIC_OBJS)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    24
 	rm -f $(SHAREDLIB) $(SHAREDLIBM)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    25
 	ln -s [email protected] $(SHAREDLIB)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    26
 	ln -s [email protected] $(SHAREDLIBM)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    27
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    28
--- zlib-1.2.3/inffast.c.orig	Fri Nov 12 22:05:29 2004
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    29
+++ zlib-1.2.3/inffast.c	Tue Mar 27 08:05:36 2012
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    30
@@ -87,7 +87,7 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    31
     code const FAR *dcode;      /* local strm->distcode */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    32
     unsigned lmask;             /* mask for first level of length codes */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    33
     unsigned dmask;             /* mask for first level of distance codes */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    34
-    code this;                  /* retrieved table entry */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    35
+    code *this;                 /* retrieved table entry */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    36
     unsigned op;                /* code bits, operation, extra bits, or */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    37
                                 /*  window position, window bytes to copy */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    38
     unsigned len;               /* match length, unused bytes */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    39
@@ -124,20 +124,20 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    40
             hold += (unsigned long)(PUP(in)) << bits;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    41
             bits += 8;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    42
         }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    43
-        this = lcode[hold & lmask];
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    44
+        this = (code *)(&(lcode[hold & lmask]));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    45
       dolen:
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    46
-        op = (unsigned)(this.bits);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    47
+        op = (unsigned)(this->bits);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    48
         hold >>= op;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    49
         bits -= op;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    50
-        op = (unsigned)(this.op);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    51
+        op = (unsigned)(this->op);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    52
         if (op == 0) {                          /* literal */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    53
-            Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    54
+            Tracevv((stderr, this->val >= 0x20 && this->val < 0x7f ?
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    55
                     "inflate:         literal '%c'\n" :
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    56
-                    "inflate:         literal 0x%02x\n", this.val));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    57
-            PUP(out) = (unsigned char)(this.val);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    58
+                    "inflate:         literal 0x%02x\n", this->val));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    59
+            PUP(out) = (unsigned char)(this->val);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    60
         }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    61
         else if (op & 16) {                     /* length base */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    62
-            len = (unsigned)(this.val);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    63
+            len = (unsigned)(this->val);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    64
             op &= 15;                           /* number of extra bits */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    65
             if (op) {
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    66
                 if (bits < op) {
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    67
@@ -155,14 +155,14 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    68
                 hold += (unsigned long)(PUP(in)) << bits;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    69
                 bits += 8;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    70
             }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    71
-            this = dcode[hold & dmask];
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    72
+            this = (code *)(&(dcode[hold & dmask]));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    73
           dodist:
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    74
-            op = (unsigned)(this.bits);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    75
+            op = (unsigned)(this->bits);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    76
             hold >>= op;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    77
             bits -= op;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    78
-            op = (unsigned)(this.op);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    79
+            op = (unsigned)(this->op);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    80
             if (op & 16) {                      /* distance base */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    81
-                dist = (unsigned)(this.val);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    82
+                dist = (unsigned)(this->val);
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    83
                 op &= 15;                       /* number of extra bits */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    84
                 if (bits < op) {
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    85
                     hold += (unsigned long)(PUP(in)) << bits;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    86
@@ -259,7 +259,8 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    87
                 }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    88
             }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    89
             else if ((op & 64) == 0) {          /* 2nd level distance code */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    90
-                this = dcode[this.val + (hold & ((1U << op) - 1))];
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    91
+                this = (code *)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    92
+		    (&(dcode[this->val + (hold & ((1U << op) - 1))]));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    93
                 goto dodist;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    94
             }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    95
             else {
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    96
@@ -269,7 +270,7 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    97
             }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    98
         }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
    99
         else if ((op & 64) == 0) {              /* 2nd level length code */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   100
-            this = lcode[this.val + (hold & ((1U << op) - 1))];
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   101
+            this = (code *)(&(lcode[this->val + (hold & ((1U << op) - 1))]));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   102
             goto dolen;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   103
         }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   104
         else if (op & 32) {                     /* end-of-block */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   105
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   106
--- zlib-1.2.3/deflate.c.orig   Tue Mar 27 10:02:52 2012
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   107
+++ zlib-1.2.3/deflate.c        Sun Jul 17 19:27:31 2005
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   108
@@ -88,9 +88,13 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   109
       void match_init OF((void)); /* asm code initialization */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   110
       uInt longest_match  OF((deflate_state *s, IPos cur_match));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   111
 #else
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   112
+#ifdef ORIG_LONGEST_MATCH
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   113
 local uInt longest_match  OF((deflate_state *s, IPos cur_match));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   114
+#else
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   115
+uInt longest_match  OF((deflate_state *s, IPos cur_match));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   116
 #endif
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   117
 #endif
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   118
+#endif
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   119
 local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   120
 
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   121
 #ifdef DEBUG
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   122
@@ -1010,6 +1014,7 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   123
 #endif
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   124
 }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   125
 
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   126
+#if defined(ORIG_LONGEST_MATCH) || defined(ORIG_LONGEST_MATCH_GLOBAL)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   127
 #ifndef FASTEST
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   128
 /* ===========================================================================
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   129
  * Set match_start to the longest match starting at the given string and
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   130
@@ -1024,7 +1029,11 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   131
 /* For 80x86 and 680x0, an optimized version will be provided in match.asm or
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   132
  * match.S. The code will be functionally equivalent.
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   133
  */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   134
+#ifdef ORIG_LONGEST_MATCH_GLOBAL
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   135
+uInt longest_match(s, cur_match)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   136
+#else
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   137
 local uInt longest_match(s, cur_match)
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   138
+#endif
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   139
     deflate_state *s;
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   140
     IPos cur_match;                             /* current match */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   141
 {
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   142
@@ -1168,6 +1177,7 @@
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   143
 }
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   144
 #endif /* ASMV */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   145
 #endif /* FASTEST */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   146
+#endif /* ORIG_LONGEST_MATCHT */
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   147
 
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   148
 /* ---------------------------------------------------------------------------
78809aba88fe 7102535 libz.so performance on Solaris needs significant improvement
Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
parents:
diff changeset
   149
  * Optimized version for level == 1 or strategy == Z_RLE only