提交 02e5e583 编写于 作者: B Behdad Esfahbod

Speed up Speed up hb_set_digest_common_bits_t calcs

Correctly this time.
上级 893991fc
...@@ -54,9 +54,11 @@ struct hb_set_digest_common_bits_t ...@@ -54,9 +54,11 @@ struct hb_set_digest_common_bits_t
} }
inline void add_range (hb_codepoint_t a, hb_codepoint_t b) { inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
/* TODO Speedup. */ add (a);
for (unsigned int i = a; i < b + 1; i++) /* The negation here stands for ~(x-1). */
add (i); mask_t upper_bits = -(1 << _hb_bit_storage (a ^ b));
mask &= upper_bits;
value &= upper_bits;
} }
inline bool may_have (hb_codepoint_t g) const { inline bool may_have (hb_codepoint_t g) const {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册