-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
EXPERIMENTAL: Hash spans unconditionally during incr. comp. #46490
EXPERIMENTAL: Hash spans unconditionally during incr. comp. #46490
Conversation
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
@bors try |
EXPERIMENTAL: Hash spans unconditionally during incr. comp. It would be good for reliability if we could do without all this special-casing around change detection for spans. This PR removes most extra logic around span hashing and is meant to gauge how much of a performance regression this would cause. Much of the potential performance loss should be recoverable by better factoring queries -- but that's a medium term undertaking and should not block incr. comp. stabilization. cc @nikomatsakis @Mark-Simulacrum
cc #46303 |
…pstream crates in the SVH.
☀️ Test successful - status-travis |
@bors try |
EXPERIMENTAL: Hash spans unconditionally during incr. comp. It would be good for reliability if we could do without all this special-casing around change detection for spans. This PR removes most extra logic around span hashing and is meant to gauge how much of a performance regression this would cause. Much of the potential performance loss should be recoverable by better factoring queries -- but that's a medium term undertaking and should not block incr. comp. stabilization. cc @nikomatsakis @Mark-Simulacrum
OK, so the results from http://perf.rust-lang.org/compare.html?start=fdfbcf85d55da97ed1a00823510b876018047aaf&end=fe077faa64169fdb9a5710789e6875110734f316&stat=instructions%3Au are pretty much as expected:
I interpret these big regressions as some codegen units being invalidated that weren't invalidated before for the same change set. Factoring spans out of the HIR, MIR, and Attributes should bring the lost performance back, but is not a small undertaking. I've pushed some more commits that enable caching of many high-impact queries and started another try-build. This additional set of queries can only be cached because of the accurate span hashing. Let's see how performance looks for that. |
💥 Test timed out |
@bors try |
@bors retry |
EXPERIMENTAL: Hash spans unconditionally during incr. comp. It would be good for reliability if we could do without all this special-casing around change detection for spans. This PR removes most extra logic around span hashing and is meant to gauge how much of a performance regression this would cause. Much of the potential performance loss should be recoverable by better factoring queries -- but that's a medium term undertaking and should not block incr. comp. stabilization. cc @nikomatsakis @Mark-Simulacrum
☀️ Test successful - status-travis |
This is superseded by #46556. Thanks for the performance measurements, @Mark-Simulacrum! |
…akis incr.comp.: Enable query result caching for many more queries Newly cached queries are: * const_is_rvalue_promotable_to_static * trans_fulfill_obligation * optimized_mir * unsafety_check_result * borrowck * mir_borrowck * mir_const_qualif * contains_extern_indicator * def_symbol_name * symbol_name This also includes the stricter `Span` hashing first mentioned in #46490, which will lead to more false positives in release builds but overall is more correct -- and necessary for caching MIR. Hopefully we will soon be able to reduce the rate of false positives again by factoring `Span` out of MIR. r? @nikomatsakis
It would be good for reliability if we could do without all this special-casing around change detection for spans. This PR removes most extra logic around span hashing and is meant to gauge how much of a performance regression this would cause. Much of the potential performance loss should be recoverable by better factoring queries -- but that's a medium term undertaking and should not block incr. comp. stabilization.
cc @nikomatsakis @Mark-Simulacrum