Skip to content

Inline function in Base.valid16? implementation #14433

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
Apr 13, 2025

Conversation

sabiwara
Copy link
Contributor

@sabiwara sabiwara commented Apr 13, 2025

I realized I had a mistake in my previous benchmark for #14429 - I was using an invalid string so it was measuring the case the function bails early 🤦

For valid strings, the speedup was almost non-existent as is - but provided we inline the valid_char_name function we can still achieve a ~2x speedup for valid strings over the pre-optimization implementation.

Updated benchmark:
sabiwara/elixir_benches@af34130

@sabiwara sabiwara merged commit d4f3445 into elixir-lang:main Apr 13, 2025
11 checks passed
@sabiwara sabiwara deleted the inline-valid-char branch April 13, 2025 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants