Skip to content

gh-144264: Speed up Base64 decoding of data containing ignored characters#144265

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:binascii-a2b_base64-ignorechars-speedup
Jan 29, 2026
Merged

gh-144264: Speed up Base64 decoding of data containing ignored characters#144265
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:binascii-a2b_base64-ignorechars-speedup

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jan 27, 2026

Copy link
Copy Markdown
Member

Try the fast path again after decoding a quad the slow path. Use a bitmap cache for the ignorechars argument.

…characters

Try the fast path again after decoding a quad the slow path.
Use a bitmap cache for the ignorechars argument.
Comment thread Modules/binascii.c Outdated

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@serhiy-storchaka serhiy-storchaka merged commit 92c0ec2 into python:main Jan 29, 2026
47 checks passed
@serhiy-storchaka serhiy-storchaka deleted the binascii-a2b_base64-ignorechars-speedup branch January 29, 2026 15:33
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
…characters (pythonGH-144265)

Try the fast path again after decoding a quad the slow path.
Use a bitmap cache for the ignorechars argument.
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.

3 participants