Skip to content

Conversation

@nnethercote
Copy link
Contributor

Because it results in fewer allocations and small speedups on some
benchmarks.

Because it results in fewer allocations and small speedups on some
benchmarks.
@rust-highfive
Copy link
Contributor

r? @petrochenkov

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 8, 2018
@petrochenkov
Copy link
Contributor

What's the size of ast::Expr before and after on 64 and 32 bit targets?

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 8, 2018
@nnethercote
Copy link
Contributor Author

I checked: the size is unchanged. I don't have the exact numbers on hand, but the Lit variant is far from the largest even after the change.

@petrochenkov
Copy link
Contributor

Great.
@bors r+

@bors
Copy link
Collaborator

bors commented Nov 8, 2018

📌 Commit 706c2ad has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 8, 2018
@nnethercote
Copy link
Contributor Author

I have the numbers now: on 64-bit, ExprKind is 72 bytes. The Lit variant was 15 bytes, it's now 39 bytes. There are 6 variants that are larger than that, and another 4 that are also 39 bytes.

@Mark-Simulacrum
Copy link
Member

@bors rollup

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Nov 9, 2018
…henkov

Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.

Because it results in fewer allocations and small speedups on some
benchmarks.
bors added a commit that referenced this pull request Nov 9, 2018
Rollup of 17 pull requests

Successful merges:

 - #55576 (Clarify error message for -C opt-level)
 - #55633 (Support memcpy/memmove with differing src/dst alignment)
 - #55638 (Fix ICE in msg_span_from_free_region on ReEmpty)
 - #55659 (rustc: Delete grouping logic from the musl target)
 - #55719 (Sidestep link error from rustfix'ed code by using a *defined* static.)
 - #55736 (Elide anon lifetimes in conflicting impl note)
 - #55739 (Consume optimization fuel from the MIR inliner)
 - #55742 (Avoid panic when matching function call)
 - #55753 (borrow_set: remove a helper function and a clone it uses)
 - #55755 (Improve creation of 3 IndexVecs)
 - #55758 ([regression - rust2018]: unused_mut lint false positives on nightly)
 - #55760 (Remove intermediate font specs)
 - #55761 (mir: remove a hacky recursive helper function)
 - #55774 (wasm32-unknown-emscripten expects the rust_eh_personality symbol)
 - #55777 (Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.)
 - #55783 (Deprecate mpsc channel selection)
 - #55788 (rustc: Request ansi colors if stderr isn't a tty)

Failed merges:

r? @ghost
@bors bors merged commit 706c2ad into rust-lang:master Nov 9, 2018
@nnethercote nnethercote deleted the less-P-in-ast branch November 11, 2018 21:00
nnethercote added a commit to nnethercote/rust that referenced this pull request Jan 16, 2019
It's simpler and makes some benchmark run up to 1% faster. It also makes
`hir::ExprKind` more like `ast::ExprKind` (which underwent the
equivalent change in rust-lang#55777).
VardhanThigle pushed a commit to jethrogb/rust that referenced this pull request Jan 31, 2019
It's simpler and makes some benchmark run up to 1% faster. It also makes
`hir::ExprKind` more like `ast::ExprKind` (which underwent the
equivalent change in rust-lang#55777).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: 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