Skip to content

improve nodejs buffer base64 and base64url performance #2542

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

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Aug 16, 2024

Improves the performance of base64 and base64url conversion from binary. Applies to buffer.toString('base64') and buffer.toString('base64url')

@anonrig anonrig requested a review from jasnell August 16, 2024 14:59
@anonrig anonrig requested review from a team as code owners August 16, 2024 14:59
@anonrig anonrig force-pushed the yagiz/improve-buffer-tostring branch from debd3f5 to bfdf13a Compare August 16, 2024 15:08
@anonrig anonrig requested a review from jasnell August 16, 2024 15:08
@anonrig anonrig requested review from mikea and fhanau August 16, 2024 15:23
@fhanau
Copy link
Contributor

fhanau commented Aug 16, 2024

LGTM – I was looking at kj::encodeBase64 a few days ago not even based on performance but since it performs excessive memory allocations. It should probably be optimized still but this change should fix any performance issues for the JS APIs.

@jasnell jasnell merged commit 299094f into main Aug 16, 2024
9 checks passed
@jasnell jasnell deleted the yagiz/improve-buffer-tostring branch August 16, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants