Skip to content

Use File::metadata instead of fs::metadata to choose buffer size - #47520

Merged
bors merged 1 commit into
rust-lang:masterfrom
mbrubeck:fstat
Jan 18, 2018
Merged

Use File::metadata instead of fs::metadata to choose buffer size#47520
bors merged 1 commit into
rust-lang:masterfrom
mbrubeck:fstat

Conversation

@mbrubeck

Copy link
Copy Markdown
Contributor

This replaces a stat syscall with fstat or similar, which can be faster. Fixes#47519.

This replaces a `stat` syscall with `fstat` or similar, which can be
faster. Fixesrust-lang#47519.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @shepmaster

(rust_highfive has picked a reviewer for you, use r? to override)

@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Jan 17, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit e9fdee8 has been approved by Mark-Simulacrum

@Mark-SimulacrumMark-Simulacrum added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 17, 2018
@mbrubeck

Copy link
Copy Markdown
ContributorAuthor

I confirmed this speeds up these functions by a small constant amount on my Linux system. Example speedup:

test read_32kb_alloc ... bench: 3,159 ns/iter (+/- 693)
test read_32kb_alloc2 ... bench: 2,875 ns/iter (+/- 395)

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jan 17, 2018
Use File::metadata instead of fs::metadata to choose buffer size
This replaces a `stat` syscall with `fstat` or similar, which can be faster. Fixesrust-lang#47519.
bors added a commit that referenced this pull request Jan 18, 2018
Rollup of 6 pull requests
- Successful merges: #47250, #47313, #47398, #47468, #47471, #47520
- Failed merges:
@bors
bors merged commit e9fdee8 into rust-lang:masterJan 18, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@mbrubeck@rust-highfive@Mark-Simulacrum@bors@shepmaster