From: Hans Kristian Rosbach Date: Sun, 2 Nov 2014 14:01:09 +0000 (+0100) Subject: Testing on a Raspberry Pi shows that -DUNALIGNED_OK and -DCRC32_UNROLL_LESS X-Git-Tag: 1.9.9-b1~896 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be6166c051cca812a8284dc20be1674acd618d26;p=thirdparty%2Fzlib-ng.git Testing on a Raspberry Pi shows that -DUNALIGNED_OK and -DCRC32_UNROLL_LESS 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. --- diff --git a/configure b/configure index 8cbdeb697..560324975 100755 --- 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