Skip to content

base64: encode without snprintf: a 29x speedup#10026

Closed
bagder wants to merge 7 commits intomasterfrom
bagder/base64-no-snprintf
Closed

base64: encode without snprintf: a 29x speedup#10026
bagder wants to merge 7 commits intomasterfrom
bagder/base64-no-snprintf

Conversation

@bagder
Copy link
Member

@bagder bagder commented Dec 3, 2022

For speed

Test setup

https://gist.github.com/bagder/baee5725e09a5977ef5b0471e2b3334f

Measurements

Best out three runs on my machine.

Old code: 5m55.291
New code: 12.254 seconds

A 28.99 times speedup.

@Bouska
Copy link

Bouska commented Dec 5, 2022

You can remove line 41, we don't need the curl_printf.h header anymore.

@bagder bagder changed the title base64: encode without using snprintf base64: encode without using snprintf: a 29x speedup Dec 5, 2022
@bagder bagder changed the title base64: encode without using snprintf: a 29x speedup base64: encode without snprintf: a 29x speedup Dec 5, 2022
@bagder bagder closed this in fc02a78 Dec 5, 2022
@bagder bagder deleted the bagder/base64-no-snprintf branch December 5, 2022 10:34
@MonkeybreadSoftware
Copy link
Contributor

Great work.

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.

4 participants