Skip to content

Specify initial size in HashSet constructor #11988

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

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

Erarndt
Copy link
Contributor

@Erarndt Erarndt commented Jun 10, 2025

Sets the initial size of the HashSet base on the likely size of elements we could expect.

Changes Made

Testing

Notes

@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 17:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR specifies the initial capacity for the HashSet used to store idle node IDs, improving memory allocation efficiency.

  • Updates the HashSet constructor call in Scheduler.cs to include _availableNodes.Count as the initial size.

@YuliiaKovalova YuliiaKovalova merged commit cf05368 into dotnet:main Jul 7, 2025
10 checks passed
@Erarndt Erarndt deleted the dev/erarndt/initialHashSetSize branch July 10, 2025 18:13
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.

4 participants