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

pref: pre-computed to reduce the overhead of computing the crc of the flags of entry. #579

Open
bigboss2063 opened this issue Jan 11, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bigboss2063
Copy link
Member

bigboss2063 commented Jan 11, 2024

Because the crc of flags like DataFlag, DataStatus and DataStructure is definite,We could pre-computed to reduce the overhead of computing the crc like LevelDB.

@bigboss2063 bigboss2063 added enhancement New feature or request help wanted Extra attention is needed labels Jan 11, 2024
@ksankeerth
Copy link
Contributor

Hi @bigboss2063,

Can I work on it?

Thanks,
Sankeerthan

@bigboss2063
Copy link
Member Author

Hi @bigboss2063,

Can I work on it?

Thanks, Sankeerthan

Of course, but the feasibility of this plan still needs to be considered, we can discuss it

@ksankeerth
Copy link
Contributor

Hi @bigboss2063 ,

I went through the code. I see the below is the encoding format for the entry.

image

Between Ds and flag bytes, there are some other bytes TTL and status. Therefore, I believe We cannot use pre-Computed CRCs for Ds and flags with the current encoding format. (btw, I'm not an expert in CRCs. )

@bigboss2063
Copy link
Member Author

Whether we can do it in a reasonable order when constructing the CRC does not seem to have an impact? The underlying storage is stored as it is, and in the order we need when constructing the CRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants