Uh oh!
There was an error while loading. Please reload this page.
parser: Cleanup LazyTokenStream and avoid some clones - #78587
Conversation
by using a named struct instead of a closure.
petrochenkov
commented
Oct 30, 2020
@bors try @rust-timer queue |
rust-timer
commented
Oct 30, 2020
Awaiting bors try build completion |
bors
commented
Oct 30, 2020
⌛ Trying commit d0c63bc with merge 99e4ef7ba85e18068c4232297da28acab7db20f6... |
bors
commented
Oct 30, 2020
☀️ Try build successful - checks-actions |
rust-timer
commented
Oct 30, 2020
Queued 99e4ef7ba85e18068c4232297da28acab7db20f6 with parent ffe5288, future comparison URL. |
rust-timer
commented
Oct 31, 2020
Finished benchmarking try commit (99e4ef7ba85e18068c4232297da28acab7db20f6): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Aaron1011
commented
Oct 31, 2020
It looks like adding a @bors r+ |
bors
commented
Oct 31, 2020
📌 Commit d0c63bc has been approved by |
Aaron1011
commented
Oct 31, 2020
@bors rollup- |
Rollup of 7 pull requests Successful merges: - rust-lang#74622 (Add std::panic::panic_any.) - rust-lang#77099 (make exp_m1 and ln_1p examples more representative of use) - rust-lang#78526 (Strip tokens from trait and impl items before printing AST JSON) - rust-lang#78550 (x.py setup: Create config.toml in the current directory, not the top-level directory) - rust-lang#78577 (validator: Extend aliasing check to a call terminator) - rust-lang#78581 (Constantify more BTreeMap and BTreeSet functions) - rust-lang#78587 (parser: Cleanup `LazyTokenStream` and avoid some clones) Failed merges: r? `@ghost`
petrochenkov
commented
Nov 3, 2020
@Aaron1011 The second reason for introducing an enum is that using The problem is that the requirement Perhaps if 16 byte is significantly better in terms of allocations and cloning, it will compensate... I need to check. |
Mark-Simulacrum
commented
Nov 4, 2020
Since Lazytokenstream is heap allocated, you might consider bit packing the discriminant (by increasing alignment slightly); there's some helpers available in rustc data structures to do so somewhat easily. Unfortunately it's unlikely to be an ergonomic thing as you definitely lose matching and such. |
petrochenkov
commented
Nov 4, 2020
Some statistics of token stream lengths in So, optimizing for 1-token streams is important, and optimizing for 0-token streams is not too important. |
by using a named struct instead of a closure.
r? @Aaron1011