Skip to content

Trie: reduce cell size - by using int16 for prefix lengths#17134

Merged
AskAlexSharov merged 13 commits into
mainfrom
alex/reduce_cell_size_32
Oct 4, 2025
Merged

Trie: reduce cell size - by using int16 for prefix lengths#17134
AskAlexSharov merged 13 commits into
mainfrom
alex/reduce_cell_size_32

Conversation

@AskAlexSharov

Copy link
Copy Markdown
Collaborator

536 -> 488 bytes

Comment thread execution/commitment/commitment.go Outdated
CodeHash common.Hash
Storage common.Hash
StorageLen int
StorageLen int16

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

int8 then ( len is up to 32)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

actually it's hard to move from int16 to int8:

  • we have code like 128 - depth
  • and even if i workaround it as int8(128 - int16(depth)) i still facing int overflow/underflow in many places

@awskii awskii mentioned this pull request Oct 2, 2025
15 tasks
@AskAlexSharov AskAlexSharov merged commit 1fbf9ed into main Oct 4, 2025
18 checks passed
@AskAlexSharov AskAlexSharov deleted the alex/reduce_cell_size_32 branch October 4, 2025 09:12
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