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

deflate: Separate code and lengths #619

Closed
wants to merge 1 commit into from

Conversation

klauspost
Copy link
Owner

Experiment by adding golang/go#46007 from @teivah

Before/after:

file	out	level	insize	outsize	millis	mb/s
github-ranks-backup.bin	gzkp	1	1862623243	458201422	6979	254.51
github-ranks-backup.bin	gzkp	1	1862623243	458201422	7273	244.22

enwik9	gzkp	1	1000000000	382781160	5805	164.26
enwik9	gzkp	1	1000000000	382781160	5976	159.57

github-ranks-backup.bin	gzkp	-2	1862623243	1298789681	5592	317.65
github-ranks-backup.bin	gzkp	-2	1862623243	1298789681	5420	327.70

Slower for general compression, but faster for huffman only compression.

Experiment by adding golang/go#46007 from @teivah

Before/after:

```
file	out	level	insize	outsize	millis	mb/s
github-ranks-backup.bin	gzkp	1	1862623243	458201422	6979	254.51
github-ranks-backup.bin	gzkp	1	1862623243	458201422	7273	244.22

enwik9	gzkp	1	1000000000	382781160	5805	164.26
enwik9	gzkp	1	1000000000	382781160	5976	159.57

github-ranks-backup.bin	gzkp	-2	1862623243	1298789681	5592	317.65
github-ranks-backup.bin	gzkp	-2	1862623243	1298789681	5420	327.70

```

Slower for general compression, but faster for huffman only compression.
klauspost added a commit that referenced this pull request Jun 8, 2022
~5% Faster for huffman-only, same for rest.

```
github-ranks-backup.bin	gzkp	-2	1862623243	1298789681	5547	320.22
github-ranks-backup.bin	gzkp	-2	1862623243	1298789681	5305	334.83
```

Replaces #619 - more speedup, and no regression.
@klauspost
Copy link
Owner Author

See #622 for better alternative.

@klauspost klauspost closed this Jun 8, 2022
@klauspost klauspost deleted the experiment-separate-code-len-tables branch June 8, 2022 10:04
klauspost added a commit that referenced this pull request Jun 9, 2022
~5% Faster for huffman-only, same for rest.

```
github-ranks-backup.bin	gzkp	-2	1862623243	1298789681	5547	320.22
github-ranks-backup.bin	gzkp	-2	1862623243	1298789681	5305	334.83
```

Replaces #619 - more speedup, and no regression.
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.

None yet

1 participant