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

Add a BufReader benchmark for reads smaller than the buffer #1460

Merged
merged 1 commit into from
Oct 9, 2022

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Oct 7, 2022

I think this is a reasonably-real-world example of running into the regression in rust-lang/rust#102727

The idea is that a user may drive a BufReader by manually accessing the buffer, then calling consume then fill_buf. The regression is hit when the wrapped Read impl doesn't fill the whole BufReader buffer in one read. Which a snappy decoder won't, because a decompressed data frame is limited to 65536 bytes.

Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I left two comments.

Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Kobzol Kobzol merged commit 9e8c08f into rust-lang:master Oct 9, 2022
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.

2 participants