-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: improve encoding #1768
perf: improve encoding #1768
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just the smallest change, lgtm otherwise
cf105ba
to
a0a334a
Compare
@mcollina isn't there security implication to this? i.e. what happens if a partial symbol stays buffered in the encoder between requests? |
a0a334a
to
0637fd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there still a perf improvement?
Yes I updated the description of the pull request. |
it does not seem to add much. |
Mainly two reasons:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is worth it.
I'm working on adding a fast path to TextDecoder for UTF8. I'll close this pull request. |
With the addition of the fast path utf8 pull request, here's the new result for the benchmark:
|
I like the improvement on all the methods. |
Before:
After: