From ea2dd54b68db49adb05266ec18414b2bbc20af0f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 26 May 2022 11:31:28 -0600 Subject: [PATCH] [map] Place item hash between key and value, not after them This way if only one of key and value is 64bit (eg. pointer), and other is 32bit, the whole item will fit in 128bit, whereas before it would have been bumped up to 196 if only value was 64bit (a common use-case for us.) --- src/hb-map.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-map.hh b/src/hb-map.hh index d146b804c..3084d478d 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -68,8 +68,8 @@ struct hb_hashmap_t struct item_t { K key; - V value; uint32_t hash; + V value; void clear () {