You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid layout calculations in assert_bits to speed up match checking
assert_bits ensures that the given type matches the type of the constant
value, and additionally performs a query for the layout of the given
type to get its size. This is then used to assert that it matches the
size of the constant. But since the types are already known to be the
same, this second check is unnecessary, and skipping it also allows to
skip the expensive layout query.
For the unicode_normalization crate, the match checking time drops from
about 3.8s to about 0.8s for me.
Ref #55528
cc unicode-rs/unicode-normalization#29
0 commit comments