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

2 bits for serialization of statement tag #189

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

racs4
Copy link
Contributor

@racs4 racs4 commented Oct 7, 2022

Decreases serialization of statement type in 2 bits

With four types of statements is only needed 2 bits to specify its types. Before this commit 4 bits were used.
@steinerkelvin steinerkelvin changed the title change statement serialization to use 2 bits 2 bits for serialization of statement tag Oct 7, 2022
@steinerkelvin
Copy link
Contributor

This has the clear benefit of saving block space.
But also leaves no space for a backwards-compatible way to add a new statement type (in a fork) as the current 4 statement types would fill exactly the 2 bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants