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

Use byte for RuleKind and DocKind #7332

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

anderseknert
Copy link
Member

Saving 7 bytes per index result. Not much, but adds up to ~10Mb in the regal lint benchmark. Changing the underlying type is technically a breaking change I suppose, but in the unlikely case anyone used this outside of OPA (we barely use it ourselves!), they'd still have to do and int() conversion to work with it as an int, which will still work.

Saving 7 bytes per index result. Not much, but adds up to ~10Mb in the
`regal lint` benchmark. Changing the underlying type is technically a
breaking change I suppose, but in the unlikely case anyone used this
outside of OPA (we barely use it ourselves!), they'd still have to do
and int() conversion to work with it as an int, which will still work.

Signed-off-by: Anders Eknert <[email protected]>
Copy link
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

I just wondered "why not uint8?" but that's what byte is an alias for. LGTM 👍

@anderseknert anderseknert merged commit 97b8572 into open-policy-agent:main Jan 31, 2025
28 checks passed
@anderseknert anderseknert deleted the int-to-byte branch January 31, 2025 12:17
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.

2 participants