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

Refactor Take/Skip state to non-nullable int. Define the default value to -1. #416

Closed
Tracked by #427
fiseni opened this issue Nov 9, 2024 · 0 comments · Fixed by #441
Closed
Tracked by #427

Refactor Take/Skip state to non-nullable int. Define the default value to -1. #416

fiseni opened this issue Nov 9, 2024 · 0 comments · Fixed by #441
Assignees

Comments

@fiseni
Copy link
Collaborator

fiseni commented Nov 9, 2024

The theme of version 9 is to reduce the allocation as much as possible. We'll squeeze every unnecessary allocated byte.
In this context, Take and Skip properties are defined as nullable int values, where the null value means "not set". Considering that int? has a size of 8 bytes compared to 4 bytes for int (on x64), we'll update these properties to non-nullable int, and the default value will be defined as -1.

Breaking change:
The common use of this library will remain unchanged. But, folks who have custom evaluators, extensions, or have custom logic that depends on the specification state directly will be affected by this change.

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 a pull request may close this issue.

1 participant