Closed briansmith closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.28%. Comparing base (
a83de3c
) to head (e8e508b
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Previously, the compiler would bounds-check the array slicing in
Digest::as_ref()
. It would also do (and still does, to a lesser extent) unnecessary bounds checks inBlockContext::{update, finish}
andContext::{update, finish}
. By using enums instead, the compiler is better able to understand the range (at least) of valid lengths, so it can optimize better. In particular, the compiler can elide some runtime bounds checks with these changes.