Skip to content
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

perf: optimize crack code creation #15

Merged
merged 5 commits into from
Mar 21, 2024
Merged

Conversation

william-silversmith
Copy link
Contributor

@william-silversmith william-silversmith commented Mar 21, 2024

Adds another 20%ish performance improvement for encoding.

I found the encoder does not need to compute the disjoint set or collect edges. Instead, we can scan through the adjacency graph looking for clusters, which is a memory aligned scan.

I also replaced 4 if statements in the symbol to codepoint encoder with a lookup table to reduce branch prediction errors.

@william-silversmith william-silversmith added the enhancement New feature or request label Mar 21, 2024
@william-silversmith william-silversmith self-assigned this Mar 21, 2024
@william-silversmith william-silversmith merged commit 4cacf2e into main Mar 21, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant