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

Miscellaneous inlining improvements #69256

Merged
merged 3 commits into from Feb 20, 2020
Merged

Conversation

@nnethercote
Copy link
Contributor

nnethercote commented Feb 18, 2020

These commits inline some hot functions that aren't currently inlined, for some speed wins.

r? @Centril

nnethercote added 3 commits Feb 18, 2020
It only has two call sites, and the one within `from_utf8` is hot within
rustc itself.
Mostly, these are the ones whose body just contains `f(self)`.
@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Feb 18, 2020

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 18, 2020

Awaiting bors try build completion

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 18, 2020

⌛️ Trying commit e761f3a with merge 2a7a3a1...

bors added a commit that referenced this pull request Feb 18, 2020
Miscellaneous inlining improvements

These commits inline some hot functions that aren't currently inlined, for some speed wins.

r? @Centril
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 18, 2020

💔 Test failed - checks-azure

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Feb 18, 2020

The try push failed due to a disk being full. Let's try again.

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 18, 2020

⌛️ Trying commit e761f3a with merge 995d70a...

bors added a commit that referenced this pull request Feb 18, 2020
Miscellaneous inlining improvements

These commits inline some hot functions that aren't currently inlined, for some speed wins.

r? @Centril
@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Feb 18, 2020

Local check results are good, mostly benefiting short-running benchmarks.

helloworld-check
        avg: -4.4%      min: -5.0%      max: -4.0%
deeply-nested-check
        avg: -2.8%      min: -4.3%      max: -1.9%
issue-46449-check
        avg: -3.4%      min: -4.2%      max: -2.8%
unify-linearly-check
        avg: -3.4%      min: -4.2%      max: -2.4%
trait-stress-check
        avg: -1.5%      min: -4.1%      max: -0.1%
await-call-tree-check
        avg: -3.0%      min: -4.0%      max: -2.2%
wf-projection-stress-65510-che...
        avg: -1.1%      min: -2.9%      max: -0.1%
regression-31157-check
        avg: -1.6%      min: -2.5%      max: -0.8%
tokio-webpush-simple-check
        avg: -1.3%      min: -1.8%      max: -0.8%
token-stream-stress-check
        avg: -1.3%      min: -1.3%      max: -1.2%
webrender-wrench-check
        avg: -0.9%      min: -1.2%      max: -0.5%
clap-rs-check
        avg: -0.6%      min: -1.2%      max: 0.2%
wg-grammar-check
        avg: -0.6%      min: -1.2%      max: -0.3%
ripgrep-check
        avg: -0.8%      min: -1.1%      max: -0.4%
inflate-check
        avg: -0.4%      min: -1.1%      max: -0.1%
futures-check
        avg: -0.7%      min: -1.0%      max: -0.3%
encoding-check
        avg: -0.7%      min: -0.9%      max: -0.4%
coercions-check
        avg: -0.6%?     min: -0.9%?     max: -0.3%?
tuple-stress-check
        avg: -0.2%      min: -0.8%      max: 0.0%
regex-check
        avg: -0.7%      min: -0.8%      max: -0.3%
syn-check
        avg: -0.5%      min: -0.7%      max: -0.3%
unicode_normalization-check
        avg: -0.3%      min: -0.7%      max: -0.1%
piston-image-check
        avg: -0.5%      min: -0.7%      max: -0.2%
hyper-2-check
        avg: -0.4%      min: -0.6%      max: -0.2%
keccak-check
        avg: -0.2%      min: -0.5%      max: -0.1%
webrender-check
        avg: -0.4%      min: -0.5%      max: -0.2%
html5ever-check
        avg: -0.3%      min: -0.5%      max: -0.1%
unused-warnings-check
        avg: -0.3%      min: -0.4%      max: -0.2%
deep-vector-check
        avg: -0.2%      min: -0.4%      max: -0.2%
serde-check
        avg: -0.2%      min: -0.3%      max: -0.1%
cranelift-codegen-check
        avg: -0.2%      min: -0.3%      max: -0.1%
ucd-check
        avg: -0.1%      min: -0.3%      max: 0.1%
cargo-check
        avg: -0.2%      min: -0.3%      max: -0.1%
script-servo-check
        avg: -0.2%      min: -0.3%      max: -0.1%
serde-serde_derive-check
        avg: -0.2%      min: -0.2%      max: -0.1%
style-servo-check
        avg: -0.2%      min: -0.2%      max: -0.1%
ctfe-stress-4-check
        avg: -0.1%?     min: -0.2%?     max: -0.1%?
packed-simd-check
        avg: -0.1%      min: -0.1%      max: -0.0%
@Centril

This comment has been minimized.

Copy link
Member

Centril commented Feb 18, 2020

r=me with positive perf.rl.o numbers, etc. etc.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 19, 2020

☀️ Try build successful - checks-azure
Build commit: 995d70a (995d70a9f461625ffa1dd32e8a1973b9c3ed4872)

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 19, 2020

Queued 995d70a with parent e620d0f, future comparison URL.

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Feb 19, 2020

@bors rollup=never, because it affects performance.

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 19, 2020

Finished benchmarking try commit 995d70a, comparison URL.

@bjorn3

This comment has been minimized.

Copy link
Contributor

bjorn3 commented Feb 19, 2020

There are many improvements, but syn-opt regressed.

@mati865

This comment has been minimized.

Copy link
Contributor

mati865 commented Feb 19, 2020

@bjorn3 could be noise: #69060

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Feb 19, 2020

Yes, syn is known to be noisy, that's why it has a ? next to the numbers in the table. (See the warning at the top of the page for more explanation.)

Furthermore, this change affects compiler front-end code so if there was a genuine regression for syn it should show up for syn-debug and syn-check benchmarks too.

@bors r=Centril

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 19, 2020

📌 Commit e761f3a has been approved by Centril

@Dylan-DPC

This comment has been minimized.

Copy link
Member

Dylan-DPC commented Feb 20, 2020

@bors p=1

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 20, 2020

⌛️ Testing commit e761f3a with merge 183e893...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 20, 2020

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 183e893 to master...

@bors bors added the merged-by-bors label Feb 20, 2020
@bors bors merged commit 183e893 into rust-lang:master Feb 20, 2020
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20200218.12 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@nnethercote nnethercote deleted the nnethercote:misc-inlining branch Feb 20, 2020
@jonas-schievink jonas-schievink modified the milestones: 1.44, 1.43 Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

9 participants
You can’t perform that action at this time.