Skip to content

Conversation

@Fleshgrinder
Copy link
Contributor

Avoid constructing a Base64 string inside the rejection loop by checking the high 6 bits of the most significant 64 bits directly. This preserves the existing guarantee that the Base64-URL encoded form does not start with a hyphen while reducing allocation and work in the hot path.

UUIDs equal to 0 or 1 remain impossible due to the version-4 bit pattern.

Avoid constructing a Base64 string inside the rejection loop by checking
the high 6 bits of the most significant 64 bits directly. This preserves
the existing guarantee that the Base64-URL encoded form does not start
with a hyphen while reducing allocation and work in the hot path.

UUIDs equal to 0 or 1 remain impossible due to the version-4 bit pattern.
@github-actions github-actions bot added triage PRs from the community clients small Small PRs labels Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant