From d712a02845db84dcd22c081a8e803d117b0155e4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 6 Feb 2025 00:43:10 +0000 Subject: [PATCH] [set-digest] Back to a 3-entry, with different parameters now We used to use 4,0,9 for years. Now 3,0,6. It is slightly faster and shouldn't regress common fonts. The rationale is that OT GSUB/GPOS are split by script, so any particular script is not likely to use more than a few thousands of (consecutive mostly) glyphs. The exception is CJK of course, but those have less GSUB/GPOS work. --- src/hb-set-digest.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-set-digest.hh b/src/hb-set-digest.hh index bcdec4c3e..adf875cd6 100644 --- a/src/hb-set-digest.hh +++ b/src/hb-set-digest.hh @@ -68,8 +68,8 @@ struct hb_set_digest_t { // No science in these. Intuition and testing only. using mask_t = uint64_t; - static constexpr unsigned n = 4; -#define HB_SET_DIGEST_SHIFTS {4, 0, 6, 9} + static constexpr unsigned n = 3; +#define HB_SET_DIGEST_SHIFTS {3, 0, 6} static constexpr unsigned mask_bytes = sizeof (mask_t); static constexpr unsigned mask_bits = sizeof (mask_t) * 8;