swift
64060457 - Replace range.count with upperBound &- lowerBound in extract (#94104)

Commit
4 days ago
Replace range.count with upperBound &- lowerBound in extract (#94104) The various Span extracting methods previously used range.count to get the number of elements in the desired range. This is suboptimal, because range.count has to use a checked subtraction, even though subtraction of a valid range of Span indices cannot overflow. The compiler was not able to perform this operation in general, resulting in spurious checks. Resolves rdar://192179101
Author
Parents
Loading