diff options
author | Abseil Team <absl-team@google.com> | 2022-06-06 09:28:31 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-06-06 09:29:27 -0700 |
commit | 6481443560a92d0a3a55a31807de0cd712cd4f88 (patch) | |
tree | b13d0a400f72cc4d0acc3a35f2ff73b2499a127f /absl/base/config.h | |
parent | 48419595d31609762985a6b08be504ebe6d593e7 (diff) |
Optimize SwissMap for ARM by 3-8% for all operations
https://pastebin.com/CmnzwUFN
The key idea is to avoid using 16 byte NEON and use 8 byte NEON which has lower latency for BitMask::Match. Even though 16 byte NEON achieves higher throughput, in SwissMap it's very important to catch these Matches with low latency as probing on average happens at most once.
I also introduced NonIterableMask as ARM has really great cbnz instructions and additional AND on scalar mask had 1 extra latency cycle
PiperOrigin-RevId: 453216147
Change-Id: I842c50d323954f8383ae156491232ced55aacb78
Diffstat (limited to 'absl/base/config.h')
-rw-r--r-- | absl/base/config.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/absl/base/config.h b/absl/base/config.h index 4223629e..802529fc 100644 --- a/absl/base/config.h +++ b/absl/base/config.h @@ -898,4 +898,13 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || #define ABSL_INTERNAL_HAVE_ARM_ACLE 1 #endif +// ABSL_INTERNAL_HAVE_ARM_NEON is used for compile-time detection of NEON (ARM +// SIMD). +#ifdef ABSL_INTERNAL_HAVE_ARM_NEON +#error ABSL_INTERNAL_HAVE_ARM_NEON cannot be directly set +#elif defined(__ARM_NEON) +#define ABSL_INTERNAL_HAVE_ARM_NEON 1 +#endif + + #endif // ABSL_BASE_CONFIG_H_ |