Skip to content

Improve std.uni:toCase performance#10986

Open
rikkimax wants to merge 1 commit intodlang:masterfrom
rikkimax:slow-toCase
Open

Improve std.uni:toCase performance#10986
rikkimax wants to merge 1 commit intodlang:masterfrom
rikkimax:slow-toCase

Conversation

@rikkimax
Copy link
Copy Markdown
Contributor

@rikkimax rikkimax commented Apr 1, 2026

For the benchmark that Serg pointed me at as being slow, it went from 26ns down to 7ns.

@dlang-bot
Copy link
Copy Markdown
Contributor

Thanks for your pull request and interest in making D better, @rikkimax! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#10986"

@rikkimax rikkimax force-pushed the slow-toCase branch 6 times, most recently from 6d9c455 to d2e563d Compare April 1, 2026 23:27
@xoxorwr
Copy link
Copy Markdown

xoxorwr commented Apr 2, 2026

For the benchmark that Serg pointed me at as being slow, it went from 26ns down to 7ns.

Can you share the benchmark?

@rikkimax
Copy link
Copy Markdown
Contributor Author

rikkimax commented Apr 2, 2026

For the benchmark that Serg pointed me at as being slow, it went from 26ns down to 7ns.

Can you share the benchmark?

The fork with the D code: https://github.com/cyrusmsk/mojo-unicode/tree/dlang_bench

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.

3 participants