Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of
HTTPHeaders.subscript(canonicalForm:)
(#1952)
Motivation: When getting the canonical form of header values any ascii whitespace is stripped from the values. The current implementation does this by doing equality checks on `Character` which is quite expensive. Modifications: - Update the `Substring.trimWhitespace()` function to trim on a UTF8 view Result: Retrieving the canonical form of header values is cheaper, significantly so when values contain whitespace.
- Loading branch information