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

inflate: Generate code for byte readers #236

Merged
merged 1 commit into from
Feb 25, 2020

Conversation

klauspost
Copy link
Owner

More than 20% additional speedup:

λ benchcmp old.txt new.txt
benchmark                       old ns/op     new ns/op     delta
BenchmarkGunzipCopy-32          19698008      16125274      -18.14%
BenchmarkGunzipNoWriteTo-32     19883807      16071205      -19.17%
BenchmarkGunzipStdlib-32        23397455      23201339      -0.84%

benchmark                       old MB/s     new MB/s     speedup
BenchmarkGunzipCopy-32          242.31       295.99       1.22x
BenchmarkGunzipNoWriteTo-32     240.04       296.99       1.24x
BenchmarkGunzipStdlib-32        203.99       205.72       1.01x

More than 20% additional speedup:

```
λ benchcmp old.txt new.txt
benchmark                       old ns/op     new ns/op     delta
BenchmarkGunzipCopy-32          19698008      16125274      -18.14%
BenchmarkGunzipNoWriteTo-32     19883807      16071205      -19.17%
BenchmarkGunzipStdlib-32        23397455      23201339      -0.84%

benchmark                       old MB/s     new MB/s     speedup
BenchmarkGunzipCopy-32          242.31       295.99       1.22x
BenchmarkGunzipNoWriteTo-32     240.04       296.99       1.24x
BenchmarkGunzipStdlib-32        203.99       205.72       1.01x
```
@klauspost
Copy link
Owner Author

Thanks to @dsnet for pushing me into this :)

@klauspost klauspost merged commit 8abd495 into master Feb 25, 2020
@klauspost klauspost deleted the inflate-generate-for-bytereaders branch February 25, 2020 12:08
@klauspost klauspost restored the inflate-generate-for-bytereaders branch February 25, 2020 12:08
@klauspost klauspost deleted the inflate-generate-for-bytereaders branch February 25, 2020 12:08
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.

1 participant