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

s2: Search at match end in best mode #358

Merged
merged 1 commit into from
Apr 21, 2021
Merged

Commits on Apr 21, 2021

  1. s2: Search at match end in best mode

    When we have a potential match, see if we can find a better one by searching the offset at of the first 8 mismatched bytes.
    
    Improves compression for all cases.
    
    Before/after pairs:
    ```
    Reading nyc-taxi-data-10M.csv...
    Compressing... 3325605752 -> 786648492 [23.65%]; 7.517s, 421.9MB/s
    Compressing... 3325605752 -> 779098746 [23.43%]; 8.29s, 382.6MB/s
    
    Reading adresser.json...
    Compressing... 7983034785 -> 380912248 [4.77%]; 3.924s, 1940.0MB/s
    Compressing... 7983034785 -> 372523343 [4.67%]; 4.34s, 1754.1MB/s
    
    Reading 10gb.tar...
    Compressing... 10065157632 -> 5215462149 [51.82%]; 29.462s, 325.8MB/s
    Compressing... 10065157632 -> 5208719802 [51.75%]; 32.78s, 292.8MB/s
    
    Reading enwik9...
    Compressing... 1000000000 -> 373289535 [37.33%]; 4.047s, 235.6MB/s
    Compressing... 1000000000 -> 371710958 [37.17%]; 4.513s, 211.3MB/s
    
    Reading sample.tar...
    Compressing... 808796160 -> 277822539 [34.35%]; 2.043s, 377.5MB/s
    Compressing... 808796160 -> 277710349 [34.34%]; 2.409s, 320.2MB/s
    ```
    klauspost committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    f6580ba View commit details
    Browse the repository at this point in the history