-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
proc_macro/bridge: remove Closure
.
#97045
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
(rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 9242c12 with merge 27e0a1ccff81e0c702800c4e46627bd584cded41... |
Perf bot is currently broken until #97044 is merged. See https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/perfrlo.20broken for additional information. |
☀️ Try build successful - checks-actions |
Queued 27e0a1ccff81e0c702800c4e46627bd584cded41 with parent 8019fa0, future comparison URL. |
note: only the bootstrap rustc benchmark is currently broken. |
Finished benchmarking commit (27e0a1ccff81e0c702800c4e46627bd584cded41): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Footnotes |
So maybe the extra TLS isn't feasible after all :/ I might still want to keep some of the refactors (that streamline |
I don't have enough time or interest to figure out how the bridge works and what this PR does. |
I see this is marked as a draft PR. @eddyb I'm going to mark this as |
It's a slowdown so I'll just close it. |
(Note: the first commit is from #97041, only based on it so I can build at all locally, will undraft as soon as that lands and is rebased over)
This is mostly a potential step towards bridge internals friendlier wrt process-level or wasm-based isolation.
(Follow-ups would likely involve never passing buffers and instead having more of an
io::{Read,Write}
combo)The main change here is the client->server FFI call (the
dispatch
field ofBridge
), which no longer passes any data other than theBuffer
itself - it's now effectively "global" (technically thread-local).While this direction is arguably less Rust-y, the client having a pointer to server data could only work in the same address space anyway (and in practice was always pointing higher up the stack on the same thread), and it's additional representational complexity (if one were, say, trying to construct one of these C ABI
Closure
s from outside a wasm VM, to pass to code inside the wasm VM).There's still a chance we can't do this, but it's down to performance (IMO at least) now.
cc @petrochenkov @mystor