Skip to content

Avoid some allocations in BitVector256#120427

Merged
tannergooding merged 1 commit into
dotnet:mainfrom
xtqqczze:avoidallocations-BitVector256
Oct 23, 2025
Merged

Avoid some allocations in BitVector256#120427
tannergooding merged 1 commit into
dotnet:mainfrom
xtqqczze:avoidallocations-BitVector256

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

Avoid eight unnecessary allocations (the list, plus seven internal arrays due to resizing).

@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 6, 2025
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Oct 6, 2025
@MihaZupan MihaZupan added area-System.Memory and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 6, 2025
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-memory
See info in area-owners.md if you want to be subscribed.

@MihaZupan

Copy link
Copy Markdown
Member

These methods are only called by the debugger when you hover over a SearchValues instance, so the allocation doesn't matter here.

@xtqqczze

xtqqczze commented Oct 7, 2025

Copy link
Copy Markdown
Contributor Author

These methods are only called by the debugger when you hover over a SearchValues instance, so the allocation doesn't matter here.

Maybe it's of lesser importance, but it's still eight unnecessary allocations (the list and seven internal arrays).

@tannergooding tannergooding merged commit 3e7382e into dotnet:main Oct 23, 2025
140 of 142 checks passed
@xtqqczze xtqqczze deleted the avoidallocations-BitVector256 branch October 23, 2025 20:05
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Memory community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants