KEMBAR78
Cache KeySizes array for EC types by vcsjones · Pull Request #76156 · dotnet/runtime · GitHub
Skip to content

Conversation

@vcsjones
Copy link
Member

We can cache the KeySizes object instances since they themselves are immutable. Arrays are not, so continue to copy the array of references.

Individual KeySizes instances themselves are immutable, so we can re-use instances there.
Arrays are mutable, so continue to return a copy of the array each time.
@ghost ghost assigned vcsjones Sep 25, 2022
@ghost ghost added the area-System.Security label Sep 25, 2022
@ghost
Copy link

ghost commented Sep 25, 2022

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

Issue Details

We can cache the KeySizes object instances since they themselves are immutable. Arrays are not, so continue to copy the array of references.

Author: vcsjones
Assignees: vcsjones
Labels:

area-System.Security

Milestone: -

@bartonjs bartonjs merged commit af88ee9 into dotnet:main Sep 28, 2022
@vcsjones vcsjones deleted the ec-key-sizes branch September 28, 2022 15:18
@ghost ghost locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants