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

flate: remove compressor.hash field #589

Closed
Jacalz opened this issue May 11, 2022 · 9 comments · Fixed by #590
Closed

flate: remove compressor.hash field #589

Jacalz opened this issue May 11, 2022 · 9 comments · Fixed by #590

Comments

@Jacalz
Copy link
Contributor

Jacalz commented May 11, 2022

I found the commit golang/go@949b3e9 recently landing for Go 1.19. From what I can tell from the code here in this project, most of the code that is removed in that commit is already present here. Would it be possible to apply something similar in this project?

@Jacalz
Copy link
Contributor Author

Jacalz commented May 11, 2022

I haven’t quite been able to find the CL mentioned in the commit message (I’m writing this on my phone) but I suspect https://github.com/golang/go/commits/master/src/compress/flate would help.

@klauspost
Copy link
Owner

@Jacalz I doubt it will make much of a difference, but it is also cannot hurt.

klauspost added a commit that referenced this issue May 11, 2022
Remove stateful hash and need for AND operation.

(benchmark pending)

Fixes #589
@klauspost
Copy link
Owner

klauspost commented May 11, 2022

It doesn't. Even with removing a now un-needed AND instruction. If anything it seems to make it a tiny bit slower, though that could just be noise.

@Jacalz
Copy link
Contributor Author

Jacalz commented May 19, 2022

It looks like golang/go@c25c371 landed after the commit mentioned above. I don't know if it is applicable here and if it makes a difference.

@klauspost
Copy link
Owner

@Jacalz That is totally BS. The ONLY relevant difference in the ENCODER is

Encode/Digits/Speed/1e5-4          1.65ms ± 2%     1.70ms ± 4%   +2.77%  (p=0.003 n=8+10)
Encode/Newton/Default/1e6-4        58.0ms ± 2%     57.0ms ± 1%   -1.59%  (p=0.001 n=9+9)

The rest is DECODER differences, completely unaffected by this change.

@Jacalz
Copy link
Contributor Author

Jacalz commented May 23, 2022

Yeah, I suspected as much. All those upstream commits as of late seem to make almost no changes and report massive speedups. Something is wonky. Sorry for the unnecessary noice.

@klauspost
Copy link
Owner

Yeah, not bothering with this one. Maybe next time I'm around that code, if it is there.

@Jacalz
Copy link
Contributor Author

Jacalz commented May 23, 2022

Have you reached any conclusion on the open PR?

@klauspost
Copy link
Owner

@Jacalz Ah, yeah... Thought I had merged it. Putting it in. It will probably sometimes be faster (since it has more time to finish the calculation) and sometimes not (pipeline stalls while calculating).

klauspost added a commit that referenced this issue May 23, 2022
Remove stateful hash and need for AND operation.

Benchmarks show no change.

Fixes #589
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 a pull request may close this issue.

2 participants