-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡️ zb,zm: Make header cloning cheaper when it comes from a message by…
… using Cow<Signature>. Right now cloning a header involves cloning the `PrimaryHeader` (cheap, mostly POD), and then cloning the `Fields`, which can be somewhat complex, as it involves cloning all the strings and the signature, which if dynamic could be rather costly. From things coming from a message, strings are always `Borrowed` so the cloning is cheap. So the only expensive thing is cloning the signature. Using `Cow` for it looks sensible, it's what `Str` is doing internally already effectively (with some extra tweaks).
- Loading branch information
Showing
4 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters