Skip to content

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.

2 participants