Add arg splat experiment initial tuple impl#153697
Add arg splat experiment initial tuple impl#153697teor2345 wants to merge 4 commits intorust-lang:mainfrom
Conversation
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
It should be better for someone on https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/On.20overloading/with/573924937 to review this, @oli-obk could you take over? |
|
Let's wait for the ongoing discussion on Zulip to figure out whether we need to have a proc macro, an AST manipulating attribute (like |
89102bf to
c784a57
Compare
c784a57 to
2d9e563
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2301895 to
f242558
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Add arg splat experiment initial tuple impl
This comment has been minimized.
This comment has been minimized.
f242558 to
f5c600e
Compare
This comment has been minimized.
This comment has been minimized.
f5c600e to
2d85a32
Compare
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (09bdcac): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 4.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 491.717s -> 491.643s (-0.02%) |
|
Edit: the regressions are in nalgebra, image, the CTFE stress tests, and wg-grammar. They reverse 30-60% of the gain from #155223, but only for those specific benchmarks. The only benchmark that's worse overall is the secondary CTFE stress test. As expected, adding a 2 byte splatted argument index to FnDecl and FnSig partly reverses some of the performance gains from removing 2 or 3 bytes from them here: #155223 (comment) It might be possible to keep the performance gains by storing just one bit for "an argument is splatted", and looking up the actual argument only when needed. Are there side-tables that can be used for FnDecl and FnSig? There's also a more cursed version, which stores one byte for "a low index argument is splatted", and has a marker value for "look up the splatted argument index". (We'd need to test splatted functions with 254-257 arguments, so I'd prefer not to do that unless absolutely needed.) |
2d85a32 to
930eb7a
Compare
|
Some changes occurred in coverage tests. cc @Zalathar |
View all comments
This PR is part of the argument splatting lang experiment, and FFI overloading / C++ interop project goals:
Example code using existing unstable features:
Discussion of implementation strategy:
The PR is the initial implementation of the feature:
splatincomplete feature gate#[splat]attribute on function arguments#[splat]function parameter check at THIR levelOnce this PR merges, we can add further functionality, then test it out in interop tools.
Unrelated Changes
TODOs
Out of Scope for this PR