]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Testing on a Raspberry Pi shows that -DUNALIGNED_OK and -DCRC32_UNROLL_LESS
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Sun, 2 Nov 2014 14:01:09 +0000 (15:01 +0100)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Sun, 2 Nov 2014 14:01:09 +0000 (15:01 +0100)
both give a consistent performance gain, so enable these on the armv6 arch.
Also enabled -DADLER32_UNROLL_LESS on the untested assumption that it will
also be faster.

configure

index 8cbdeb697963bd92e9812b3967df53f65e47626e..560324975b5541f1a64361a70a8fbe4450afdac3 100755 (executable)
--- a/configure
+++ b/configure
@@ -646,6 +646,8 @@ ARCH_SHARED_OBJS=''
 
 # Set ARCH specific FLAGS
 case "${ARCH}" in
+
+    # x86 and x86_64 specific optimizations
     i386 | i486 | i586 | i686 | x86_64)
        ARCHDIR=arch/x86
 
@@ -695,9 +697,25 @@ case "${ARCH}" in
             fi
         fi
     ;;
-esac
 
+    # ARM specific optimizations
+    armv3l | armv4b | armv4l | armv4tl | armv5tel | armv5tejl | armv6l | armv6hl | armv7l | armv7hl | armv7hnl)
+       ARCHDIR=arch/arm
+
+        case "${ARCH}" in
+            armv6l | armv6hl)
+                # Tests done on Raspberry pi (armv6hl) indicate that UNALIGNED_OK and CRC32_UNROLL_LESS both
+                # provide performance improvements, totaling about 1.5% for the two.
+                CFLAGS="${CFLAGS} -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS"
+                SFLAGS="${SFLAGS} -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS"
+            ;;
+        esac
+
+    ;;
+esac
 
+echo "ARCH: ${ARCH}"
+echo "Using arch directory: ${ARCHDIR}"
 
 # show the results in the log
 echo >> configure.log