From 597fa795def39e6e461ba17ce4a5316ff6bdcb08 Mon Sep 17 00:00:00 2001 From: alkis Date: Wed, 22 Feb 2017 10:26:14 -0800 Subject: [PATCH] Delete UnalignedCopy64 from snappy-stubs since the version in snappy.cc is more robust and possibly faster (assuming the compiler knows how to best copy 8 bytes between locations in memory the fastest way possible - a rather safe bet). --- snappy-stubs-internal.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h index 1954c63..405d9c1 100644 --- a/snappy-stubs-internal.h +++ b/snappy-stubs-internal.h @@ -225,20 +225,6 @@ inline void UNALIGNED_STORE64(void *p, uint64 v) { #endif -// This can be more efficient than UNALIGNED_LOAD64 + UNALIGNED_STORE64 -// on some platforms, in particular ARM. -inline void UnalignedCopy64(const void *src, void *dst) { - if (sizeof(void *) == 8) { - UNALIGNED_STORE64(dst, UNALIGNED_LOAD64(src)); - } else { - const char *src_char = reinterpret_cast(src); - char *dst_char = reinterpret_cast(dst); - - UNALIGNED_STORE32(dst_char, UNALIGNED_LOAD32(src_char)); - UNALIGNED_STORE32(dst_char + 4, UNALIGNED_LOAD32(src_char + 4)); - } -} - // The following guarantees declaration of the byte swap functions. #ifdef WORDS_BIGENDIAN