Skip to content

Match.four#1

Merged
vkrasnov merged 1 commit intogcc.amd64from
match.four
Dec 19, 2014
Merged

Match.four#1
vkrasnov merged 1 commit intogcc.amd64from
match.four

Conversation

@vkrasnov
Copy link
Copy Markdown

No description provided.

@majek
Copy link
Copy Markdown

majek commented Dec 17, 2014

Fancy describing in more details (in the commit messages) what the patches are actually doing? And how to test the correctness?

@vkrasnov
Copy link
Copy Markdown
Author

It changes the hash and longest match functions to always match at least 4 bytes, instead the 3 the spec allows. It allows for faster and more effective compression because there are less hash collisions, and false matches are discarded faster.
In theory it could lead to worse compression in some cases, but for the most common files there is an improvement for all levels both in speed and in compression ratio.
The patch should not affect correctness in any way, it simply works on longer matches, but I tested it mostly by decompressing and testing against origin.

@majek
Copy link
Copy Markdown

majek commented Dec 17, 2014

Cool. Can you squeeze the commits into a single commit and add the explanation to the commit message?

(unless there is a reason to keep it as four separate commits, but if that's the case, please explain)

…ast 4 bytes, instead the 3 the spec allows. It allows for faster and more effective compression because there are less hash collisions, and false matches are discarded faster.

In theory it could lead to worse compression in some cases, but for the most common files there is an improvement for all levels both in speed and in compression ratio.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What's the reasoning behind moving *(uInt*)match != scan_start test here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You want to resolve a false positive as soon as possible.

@PiotrSikora
Copy link
Copy Markdown

Looks good, feel free to merge it.

@yangshuxin
Copy link
Copy Markdown

Please squash these small commits into a single one with reasonably verbose commit log, just as @majek suggested.

vkrasnov added a commit that referenced this pull request Dec 19, 2014
It changes the hash and longest match functions to always match at least 4 bytes, instead the 3 the spec allows. It allows for faster and more effective compression because there are less hash collisions, and false matches are discarded faster.
In theory it could lead to worse compression in some cases, but for the most common files there is an improvement for all levels both in speed and in compression ratio.
@vkrasnov vkrasnov merged commit 93f5fe1 into gcc.amd64 Dec 19, 2014
@vkrasnov vkrasnov deleted the match.four branch July 8, 2015 15:54
fhanau pushed a commit to fhanau/zlib that referenced this pull request Feb 27, 2023
* Add CSS

* Add respec-config.js

* Add respec-w3c-common.js

* Update index.html
fhanau pushed a commit to fhanau/zlib that referenced this pull request Feb 27, 2023
First version of CompressionStreams Spec
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.

4 participants