Skip to content

add case mapping fast paths for Latin-1 - #162750

Open
ywxt wants to merge 1 commit into
rust-lang:mainfrom
ywxt:ascii_char_to_uppercase
Open

ywxt wants to merge 1 commit into
rust-lang:mainfrom
ywxt:ascii_char_to_uppercase

Conversation

@ywxt

@ywxt ywxt commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Result:

Benchmark Before (ns/iter) After (ns/iter) Improvement
bench_ascii_mix_to_lowercase 122,779.62 62,625.20 48.99%
bench_ascii_mix_to_uppercase 140,644.43 62,216.00 55.76%
bench_non_ascii_char_to_lowercase 178,361.80 62,815.57 64.78%
bench_non_ascii_char_to_uppercase 215,988.75 62,073.67 71.26%
bench_non_latin1_char_to_lowercase 296,788.33 293,113.17 -
bench_non_latin1_char_to_uppercase 348,730.00 347,126.50 -
bench_ascii_char_to_lowercase 65,546.00 62,120.53 -
bench_ascii_char_to_uppercase 65,532.87 62,126.94 -

r? @Amanieu

@rustbot

rustbot commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

library/core/src/unicode/unicode_data.rs is generated by the src/tools/unicode-table-generator tool.

If you want to modify unicode_data.rs, please modify the tool then regenerate the library source file via ./x run src/tools/unicode-table-generator instead of editing unicode_data.rs manually.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants