assert_bits already asserts that the value type equals the type that is being passed into the function, so it seems sensible to me to skip the size calculation, which is ultimately only used to assert that the size of the passed-in type is equal to the size stored in the const itself. My main motivation for this is that match checking calls assert_bits a ton of times for large matches ( > 20M for unicode_normalization) leading to millions of IMHO unneeded queries. Changing that cuts about 60-70% of the time from match checking for the unicode_normalization crate. Opinions?
if removing code that supports assertions gives tremendous speed ups then by all means do that
perhaps make it a cheaper assertion?
final alternative is to make it a debug_assertion