Skip to content

Increase io.BufferedInStream readByte speed by ~75% #3845

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

Merged

Conversation

frmdstryr
Copy link
Contributor

Improves readByte speed from ~125MB/s to ~220MB/s. See #3840

@daurnimator
Copy link
Contributor

Could you compare to my FIFO pr?

@andrewrk
Copy link
Member

andrewrk commented Dec 4, 2019

Semi-related: https://godbolt.org/z/XpA-g-

LLVM does not seem to have a problem with @fieldParentPtr or our interface pattern.

@frmdstryr
Copy link
Contributor Author

@daurnimator , I cloned the branch from #3763 built it and ran the readBufferedInStream fn from #3840 with -Drelease-fast=true and got:

578323968 bytes (578 MB, 552 MiB) copied, 7.66603 s, 75.4 MB/s

@frmdstryr
Copy link
Contributor Author

It would be good to have some sort of benchmark test suite to check performance over time

@andrewrk
Copy link
Member

andrewrk commented Dec 5, 2019

Yep, definitely. I'll set that up eventually, but also if any community member(s) wanted to run their own set of benchmarks that would be most welcome

@andrewrk andrewrk merged commit 1baaf9a into ziglang:master Dec 5, 2019
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.

3 participants