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: String hashing, creation and concatenating #560

Merged
merged 4 commits into from
Feb 5, 2025
Merged

Conversation

aapoalas
Copy link
Collaborator

@aapoalas aapoalas commented Feb 5, 2025

String hashing is currently always iterating the string twice: Once for as_str and once for hash.

String creation was also hashing twice: Once to lookup an existing string and once to store a new string.

String concatenation could also be optimised.

I also mildly refactored instruction fetching to make it a bit nicer, also a bit more performant if my quick check is correct.

@aapoalas aapoalas merged commit 28b06a1 into main Feb 5, 2025
1 check passed
@aapoalas aapoalas deleted the perf/string-actions branch February 5, 2025 23:13
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.

1 participant