From 9cc7eb80ffac20cc5cfa90b80bcff2872f6c466b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 9 May 2023 16:13:46 -0600 Subject: [PATCH] [hash] Speed-up int64 hash --- src/hb-algs.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index 1dfa2d092..14a1ac55a 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -323,7 +323,7 @@ struct template ::value && sizeof (T) > sizeof (uint32_t))> constexpr auto - impl (const T& v, hb_priority<1>) const HB_RETURN (uint32_t, (v * 8388607u) ^ ((v >> 32) * 8388607u) /* Mersenne prime */) + impl (const T& v, hb_priority<1>) const HB_RETURN (uint32_t, (v ^ (v >> 32)) * 8388607u /* Mersenne prime */) template constexpr auto impl (const T& v, hb_priority<0>) const HB_RETURN (uint32_t, std::hash>{} (hb_deref (v)))