Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use more efficient serialization format for long integers in cache files#20151

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JukkaL merged 5 commits intomasterfromserialize-long-int
Oct 31, 2025

Conversation

@JukkaL
Copy link
Collaborator

A long integer (one that doesn't fit in the 4-byte encoding) will now be encoded like this:

  • initial header byte
  • short integer (1-4 bytes) encoding the number of bytes of data and sign
  • variable-length number of data bytes (absolute value of the integer) -- all bits are used

For example, a 32-bit integer can now always be encoded using at most 6 bytes (+ type tag).

This is optimized for size efficiency, not performance, since large integers are not expected to be a performance bottleneck. Having an efficient format makes it easier to improve performance in the future, however, without changing the encoding.

The header byte has a few unused bits which could be used to slightly improve efficiency, but I decided that it's not worth the extra complexity.

Copy link
Member

@ilevkivskyiilevkivskyi left a comment

Choose a reason for hiding this comment

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

LG, thanks!

@JukkaLJukkaL merged commit7213139 intomasterOct 31, 2025
13 checks passed
@JukkaLJukkaL deleted the serialize-long-int branchOctober 31, 2025 16:01
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ilevkivskyiilevkivskyiilevkivskyi approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@JukkaL@ilevkivskyi

[8]ページ先頭

©2009-2025 Movatter.jp