Skip to content
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

escape: hex decode with a lookup-table #10376

Closed
wants to merge 2 commits into from
Closed

Conversation

bagder
Copy link
Member

@bagder bagder commented Jan 31, 2023

Faster URL decodes in curl

I wrote a test program that uses a 1MB buffer in which byte sequences are stored from 0 to 255 over and over.

Then curl_easy_escape() is called, to generate a URL encoded version of that input.

curl_easy_unescape() is then called repeatedly to decode that huge string and I measure the time needed for it to complete 10000 iterations.

On my dev host, the new code runs 2.8 times faster.

Makes the decoding 2.8 times faster in my tests.
@bagder bagder closed this in f1f8acb Jan 31, 2023
@bagder bagder deleted the bagder/urldecode-faster branch January 31, 2023 14:04
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
Makes the decoding 2.8 times faster in my tests.

Closes curl#10376
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant