From 0d5798a137b52d9be7ef88c79e59f9bf01d54f3b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 17 Apr 2013 18:19:21 -0400 Subject: [PATCH] Improve hb_set_digest_t Make Amiri rendering faster a whopping 45% again! Speends up pretty much anything I tested. --- src/hb-set-private.hh | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh index cc5d7e0f7..8128a69e3 100644 --- a/src/hb-set-private.hh +++ b/src/hb-set-private.hh @@ -167,11 +167,29 @@ struct hb_set_digest_combiner_t tail_t tail; }; -typedef hb_set_digest_combiner_t< - hb_set_digest_common_bits_t, - hb_set_digest_lowest_bits_t - > - hb_set_digest_t; + +/* + * hb_set_digest_t + * + * This is a combination of digests that performs "best". + * There is not much science to this: it's a result of intuition + * and testing. + */ +typedef hb_set_digest_combiner_t +< + hb_set_digest_lowest_bits_t, + hb_set_digest_combiner_t + < + hb_set_digest_lowest_bits_t, + hb_set_digest_lowest_bits_t + > +> hb_set_digest_t; + + + +/* + * hb_set_t + */ /* TODO Make this faster and memmory efficient. */