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

Optimize node serialization with stream vbyte #679

Open
yihuang opened this issue Feb 8, 2023 · 0 comments
Open

Optimize node serialization with stream vbyte #679

yihuang opened this issue Feb 8, 2023 · 0 comments

Comments

@yihuang
Copy link
Collaborator

yihuang commented Feb 8, 2023

Experiment: #673

Stream-vbyte1 is a faster alternative than variant in protobuf. Good to try it to optimize node serialization. The experiment shows some good improvements.

Several points:

  • we don't have enough integers to encode to reach full potential of SIMP, we have 4 int32(version/size-lo/size-hi/keyLen), assuming int32 is enough for version, is it profitable to batch multiple nodes together?
  • the golang implementation seems fail to build in CI
  • the scalar implementation seems simple enough
  • changing node encoding format need full db migration
  • hash computation use varint as well, but I guess changing that make it harder to migrate

Footnotes

  1. https://github.com/lemire/streamvbyte

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

No branches or pull requests

1 participant