Skip to content
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

Search values #83

Merged
merged 5 commits into from
Nov 16, 2024
Merged

Search values #83

merged 5 commits into from
Nov 16, 2024

Conversation

Corniel
Copy link
Contributor

@Corniel Corniel commented Nov 16, 2024

Introduction of AllowedAttribute as alternative to AllowedValuesAttribute.
Introduction of ForbiddenAttribute as alternative to FobiddenValuesAttribute.

This allows to convert the allowed/forbidden values once, and to store them in a HashSet<T>. As a result the validation times are reduced by more than 99 percent!

Method Mean Ratio
AllowedValues 321.043 us 1.000
Allowed<T> 2.775 us 0.009

…tribute.

Introduction of ForbiddenAttribute<T> as alternative to FobiddenValuesAttribute.
@Corniel Corniel added the enhancement New feature or request label Nov 16, 2024
@Corniel Corniel self-assigned this Nov 16, 2024
@Corniel Corniel merged commit 123d1f3 into main Nov 16, 2024
1 check passed
@Corniel Corniel deleted the search-values branch November 16, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants