diff --git a/snappy-internal.h b/snappy-internal.h index e442b0b..39fbda5 100644 --- a/snappy-internal.h +++ b/snappy-internal.h @@ -258,6 +258,8 @@ static inline std::pair FindMatchLength(const char* s1, s2 += 8; } } + SNAPPY_PREFETCH(s1 + 64); + SNAPPY_PREFETCH(s2 + 64); // Find out how long the match is. We loop over the data 64 bits at a // time until we find a 64-bit block that doesn't match; then we find diff --git a/snappy.cc b/snappy.cc index 9652b34..688065b 100644 --- a/snappy.cc +++ b/snappy.cc @@ -68,12 +68,6 @@ #include #endif -#if defined(__GNUC__) -#define SNAPPY_PREFETCH(ptr) __builtin_prefetch(ptr, 0, 3) -#else -#define SNAPPY_PREFETCH(ptr) (void)(ptr) -#endif - #include #include #include