Skip to content

2 bits for serialization of statement tag - #189

Open
racs4 wants to merge 1 commit into
devfrom
statement-serialization
Open

2 bits for serialization of statement tag#189
racs4 wants to merge 1 commit into
devfrom
statement-serialization

Conversation

@racs4

@racs4 racs4 commented Oct 7, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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