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

Code Quality: Improve string comparer performance #16523

Merged
merged 3 commits into from
Dec 15, 2024

Conversation

viruseg
Copy link
Contributor

@viruseg viruseg commented Nov 24, 2024

New comparator is slightly faster than [DllImport(“api-ms-win-core-string-l1-1-0.dll”)].CompareStringEx. And supports Arm. Previously, a string comparer was used for Arm without proper support for natural comparison.

Method Mean Error StdDev Allocated
Test_api-ms-win-core-string-l1-1-0.dll 1.185 ms 0.0095 ms 0.0084 ms 89 B
Test_NaturalComparer 1.072 ms 0.0073 ms 0.0065 ms 89 B

@viruseg viruseg changed the title Fix: Arm support. Small performance optimization. Fix: NaturalStringComparer. Arm support. Small performance optimization. Nov 24, 2024
@yaira2 yaira2 changed the title Fix: NaturalStringComparer. Arm support. Small performance optimization. Code Quality: NaturalStringComparer. Arm support. Small performance optimization. Nov 25, 2024
@yaira2 yaira2 changed the title Code Quality: NaturalStringComparer. Arm support. Small performance optimization. Code Quality: Improve string comparer performance Nov 25, 2024
@yaira2
Copy link
Member

yaira2 commented Nov 25, 2024

@XTorLukas fyi

@yaira2 yaira2 requested a review from hez2010 November 25, 2024 03:38
Imran-imtiaz48

This comment was marked as off-topic.

viruseg and others added 2 commits November 27, 2024 13:56
Co-authored-by: 0x5BFA <62196528+0x5bfa@users.noreply.github.com>
@yaira2 yaira2 requested a review from 0x5bfa December 15, 2024 03:05
@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Dec 15, 2024
Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yaira2 yaira2 merged commit 9e7f8a1 into files-community:main Dec 15, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants