Skip to content

Conversation

@viruseg
Copy link
Contributor

@viruseg viruseg commented Nov 13, 2025

Using switch expression in the GetTokenFromChar method slightly improves performance for .NET 8/10.

.NET 10

Method Mean Error StdDev Ratio
Sort_New 110.3 us 1.00 us 0.88 us 0.95
Sort_Old 115.6 us 0.79 us 0.70 us 1.00

.NET 9

Method Mean Error StdDev Ratio
Sort_New 125.3 us 0.45 us 0.37 us 1.00
Sort_Old 125.5 us 0.50 us 0.39 us 1.00

.NET 8

Method Mean Error StdDev Ratio
Sort_New 125.2 us 1.29 us 1.14 us 0.95
Sort_Old 131.4 us 0.71 us 0.59 us 1.00

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.31%. Comparing base (f514797) to head (36ace72).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/NaturalSort.Extension/NaturalSortComparer.cs 72.72% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
+ Coverage   93.54%   94.31%   +0.76%     
==========================================
  Files           2        2              
  Lines          93       88       -5     
  Branches       33       29       -4     
==========================================
- Hits           87       83       -4     
+ Misses          2        1       -1     
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants