idna maintenance and performance improvements #616
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I started looking at the performance profile of
to_unicode()
and here I am, 12 hours later:Codec
API that enables some of the allocation costs over multipleto_unicode()
/to_ascii()
callsI wrote some benchmarks for
to_unicode()
, before:and after:
These changes have taken care not to change any of the existing APIs.
Additionally, I saw the old thread about asking for maintenance help. At this point I feel like I'm in a pretty good position to help out with idna maintenance (and could potentially help with the other crates as well if that's useful). Let me know if that'd be useful/how that could take shape.
I've tried to keep commits atomic and easy to review (some of them benefit from reviewing while hiding whitespace changes). Let me know if there are any questions.