Skip to content

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

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

bagder wants to merge 7 commits into
masterfrom
bagder/base64-no-snprintf

Conversation

@bagder

@bagder bagder commented Dec 3, 2022 •

Copy link
Copy Markdown
Member

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.

Comment thread lib/base64.c Resolved
@Bouska

Bouska commented Dec 5, 2022

Copy link
Copy Markdown

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
Copy Markdown
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