Skip to content

Conversation

@h3xds1nz
Copy link
Member

@h3xds1nz h3xds1nz commented Oct 12, 2024

Description

Loosely follows #9221, replacing the other part of the InputLanguageSource.InputLanguageList with more modern code.

  • Instead of marshalling the array members, we just wrap the array in a ReadOnlySpan<short>.
  • Instead of using ArrayList, we preallocate the array as we know the final count.
  • The class can be sealed, no reason not to as it has no children.
  • I've formatted the file and cleared unused usings for clarity.

Single invocation of the property (without _ipp init); 5 profiles

Method Mean [ns] Error [ns] StdDev [ns] Gen0 Code Size [B] Allocated [B]
Original 556.4 ns 5.70 ns 5.33 ns 0.0696 1,245 B 1176 B
PR_EDIT 443.8 ns 4.42 ns 3.69 ns 0.0563 394 B 944 B

Customer Impact

Improved performance, decreased allocations.

Regression

No.

Testing

Local build, testing new output matches the old one.

Risk

Low.

Microsoft Reviewers: Open in CodeFlow

@h3xds1nz h3xds1nz requested review from a team as code owners October 12, 2024 11:08
@dotnet-policy-service dotnet-policy-service bot added PR metadata: Label to tag PRs, to facilitate with triage Community Contribution A label for all community Contributions labels Oct 12, 2024
@dipeshmsft
Copy link
Member

dipeshmsft commented May 16, 2025

LGTM, @h3xds1nz can you please resolve the merge conflict here as well.

@h3xds1nz h3xds1nz force-pushed the remove-arraylist-input branch from efc79af to 68366c2 Compare May 16, 2025 09:25
@h3xds1nz
Copy link
Member Author

@dipeshmsft Done :)

@codecov
Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 13.58849%. Comparing base (c572f8e) to head (68366c2).
Report is 9 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main       #9946         +/-   ##
===================================================
- Coverage   13.62756%   13.58849%   -0.03908%     
===================================================
  Files           3316        3317          +1     
  Lines         664822      664754         -68     
  Branches       74651       74642          -9     
===================================================
- Hits           90599       90330        -269     
- Misses        571523      571829        +306     
+ Partials        2700        2595        -105     
Flag Coverage Δ
Debug 13.58849% <0.00000%> (-0.03908%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@dipeshmsft dipeshmsft merged commit 57fe8ac into dotnet:main May 16, 2025
8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Community Contribution A label for all community Contributions Included in test pass PR metadata: Label to tag PRs, to facilitate with triage Status:Completed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants