From 9205845a16571b446a8240dba143f1e77b2bbe74 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Sun, 13 May 2018 07:48:40 +1000 Subject: [PATCH] Set UNALIGNED_ACCESS_IS_FAST on powerpc64 All 64bit PowerPC CPUs handle unaligned accesses reasonably fast, so set UNALIGNED_ACCESS_IS_FAST. Decompression of the snappy html test case is almost 50% faster on POWER9 with this patch applied. --- common/compiler_gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/compiler_gcc.h b/common/compiler_gcc.h index bdebce7..8bf5f5d 100644 --- a/common/compiler_gcc.h +++ b/common/compiler_gcc.h @@ -123,7 +123,7 @@ # define bswap64 __builtin_bswap64 #endif -#if defined(__x86_64__) || defined(__i386__) || defined(__ARM_FEATURE_UNALIGNED) +#if defined(__x86_64__) || defined(__i386__) || defined(__ARM_FEATURE_UNALIGNED) || defined(__powerpc64__) # define UNALIGNED_ACCESS_IS_FAST 1 #endif