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

Shrink `Nonterminal` #67340

Merged
merged 2 commits into from Jan 31, 2020
Merged

Shrink `Nonterminal` #67340

merged 2 commits into from Jan 31, 2020

Conversation

@nnethercote
Copy link
Contributor

nnethercote commented Dec 16, 2019

These commits shrink Nonterminal from 240 bytes to 40 bytes. When building serde_derive they reduce the number of memcpy calls from 9.6M to 7.4M, and it's a tiny win on a few other benchmarks.

r? @petrochenkov

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Dec 16, 2019

Notable local check-clean results:

serde-serde_derive-check
        avg: -0.8%      min: -0.8%      max: -0.8%
coercions-check
        avg: -0.4%?     min: -0.4%?     max: -0.4%?
deep-vector-check
        avg: -0.3%      min: -0.3%      max: -0.3%
tuple-stress-check
        avg: 0.2%       min: 0.2%       max: 0.2%
helloworld-check
        avg: -0.1%      min: -0.1%      max: -0.1%
issue-46449-check
        avg: -0.1%      min: -0.1%      max: -0.1%
unify-linearly-check
        avg: -0.1%      min: -0.1%      max: -0.1%
syn-check
        avg: -0.1%      min: -0.1%      max: -0.1%
unicode_normalization-check
        avg: 0.1%       min: 0.1%       max: 0.1%
await-call-tree-check
        avg: -0.1%      min: -0.1%      max: -0.1%
tokio-webpush-simple-check
        avg: -0.1%      min: -0.1%      max: -0.1%

Note that serde_derive is not part of rustc-perf, but I have included it in my local copy to get the above results.

@nnethercote nnethercote mentioned this pull request Dec 16, 2019
@Centril

This comment has been minimized.

Copy link
Member

Centril commented Dec 16, 2019

Would appreciate if we could block merging this PR on first merging #67131 since this one will generate a lot of conflicts with that PR.

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Dec 16, 2019

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Dec 16, 2019

Awaiting bors try build completion

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 16, 2019

⌛️ Trying commit ed9ba9b with merge 23f3174...

bors added a commit that referenced this pull request Dec 16, 2019
Shrink `Nonterminal`

These commits shrink `Nonterminal` from 240 bytes to 40 bytes. When building `serde_derive` they reduce the number of `memcpy` calls from 9.6M to 7.4M, and it's a tiny win on a few other benchmarks.

r? @petrochenkov
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 16, 2019

☀️ Try build successful - checks-azure
Build commit: 23f3174 (23f3174f3dafe415f12b9c931d59df4853cadedd)

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Dec 16, 2019

Queued 23f3174 with parent a605441, future comparison URL.

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Dec 16, 2019

Finished benchmarking try commit 23f3174, comparison URL.

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Dec 16, 2019

Here are the serde_derive results, for comparison:

serde-serde_derive-check
- avg: -1.1%  min: -1.8%  max: -0.7% 
- clean                 11,770,595,200.00  11,668,371,819.00  -0.9% 
- baseline incremental  14,431,966,930.00  14,328,177,470.00  -0.7% 
- clean incremental      5,746,154,634.00   5,642,802,601.00  -1.8% 
@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Dec 29, 2019

r=me after rebase

@joelpalmer

This comment has been minimized.

Copy link

joelpalmer commented Jan 6, 2020

Ping from Triage: Any updates @nnethercote?

nnethercote added 2 commits Dec 12, 2019
This commit reduces the size of `Nonterminal` from a whopping 240 bytes
to 72 bytes (on x86-64), which gets it below the `memcpy` threshold.

It also removes some impedance mismatches with `Annotatable`, which
already uses `P` for these variants.
This commit reduces the size of `Nonterminal` from a 72 bytes to 40 bytes (on
x86-64).
@nnethercote nnethercote force-pushed the nnethercote:shrink-Nonterminal branch from ed9ba9b to 7d2173e Jan 30, 2020
@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Jan 30, 2020

Back now from PTO, I have rebased.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Jan 30, 2020

Awaiting bors try build completion

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 30, 2020

⌛️ Trying commit 7d2173e with merge 1941303...

bors added a commit that referenced this pull request Jan 30, 2020
Shrink `Nonterminal`

These commits shrink `Nonterminal` from 240 bytes to 40 bytes. When building `serde_derive` they reduce the number of `memcpy` calls from 9.6M to 7.4M, and it's a tiny win on a few other benchmarks.

r? @petrochenkov
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 30, 2020

☀️ Try build successful - checks-azure
Build commit: 1941303 (1941303dc808ee27858ab3d907f612c9ab9c972d)

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Jan 30, 2020

Queued 1941303 with parent 9ed29b6, future comparison URL.

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Jan 31, 2020

rust-timer didn't give us a "finished" message, but the results are in and look as expected -- a small win.

r? @petrochenkov

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Jan 31, 2020

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 31, 2020

📌 Commit 7d2173e has been approved by petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 31, 2020

⌛️ Testing commit 7d2173e with merge b1cb3c0...

bors added a commit that referenced this pull request Jan 31, 2020
Shrink `Nonterminal`

These commits shrink `Nonterminal` from 240 bytes to 40 bytes. When building `serde_derive` they reduce the number of `memcpy` calls from 9.6M to 7.4M, and it's a tiny win on a few other benchmarks.

r? @petrochenkov
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 31, 2020

☀️ Test successful - checks-azure
Approved by: petrochenkov
Pushing b1cb3c0 to master...

@bors bors added the merged-by-bors label Jan 31, 2020
@bors bors merged commit 7d2173e into rust-lang:master Jan 31, 2020
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20200130.6 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
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 31, 2020

📣 Toolstate changed by #67340!

Tested on commit b1cb3c0.
Direct link to PR: #67340

🎉 rustc-guide on linux: test-fail → test-pass (cc @JohnTitor @amanjeev @spastorino @mark-i-m, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jan 31, 2020
Tested on commit rust-lang/rust@b1cb3c0.
Direct link to PR: <rust-lang/rust#67340>

🎉 rustc-guide on linux: test-fail → test-pass (cc @JohnTitor @amanjeev @spastorino @mark-i-m, @rust-lang/infra).
@nnethercote nnethercote deleted the nnethercote:shrink-Nonterminal branch Feb 2, 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

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