-
Notifications
You must be signed in to change notification settings - Fork 12
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
Simple optimization? #4
Comments
This is a sound idea. It seems this would reduce the amount of memory accesses, so it could improve speed. The bit twiddling hacks to store the necessary information into a packed structure tends to be a bit concerning, as there are ways this could end badly, both for portability and for performance. But I guess this is secondary topic that could be addressed in a second step. |
It's been a while since I looked at this code. If I understand correctly, this picture comes from the MMC homepage, Considering the previous steps, |
Yes, the picture is from that page 😄 |
Once it's discovered, it's indeed saved, as a "good" link. |
My question is how this saving is done. I believe some field of the node A should keep that good link. The value |
The new chain starts with |
(apart from obvious using offets instead of pointers) you could cache the next (MINMATCH+1) byte of the sequence
while promoting to the next level the nextByte should be updated to keep the next-next symbol (symbol at MINMATCH+LEVEL offset).
While searching you will start from comparing with the nextByte from the structure (and that value will be different in most cases).
And I believe in theory that can signifinactly reduce the amount of memory jumps into the buffer and improve performance 😃
The text was updated successfully, but these errors were encountered: