Skip to content

Conversation

MichaReiser
Copy link
Contributor

@MichaReiser MichaReiser commented Sep 28, 2025

Run a single fixpoint iteration for strongly connected components
to avoid exponential runtime for deeply nested cycles.

TODO:

  • Documentation
  • Investigate perf regressions
  • Test that demonstrates the "collapsing" of nested cycles
  • Review if there are any changes necessary to maybe_changed_after
  • Investigate why cycle_nested_deep_conditional_changed::the_test sometimes hangs or panics

Copy link

netlify bot commented Sep 28, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 6e42e23
🔍 Latest deploy log https://app.netlify.com/projects/salsa-rs/deploys/68e817fcb972e600089d6c6f

Copy link

codspeed-hq bot commented Sep 28, 2025

CodSpeed Performance Report

Merging #995 will degrade performances by 12.14%

Comparing MichaReiser:fixpoint-scc (6e42e23) with master (8b0831f)

Summary

⚡ 1 improvement
❌ 5 regressions
✅ 7 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
amortized[Input] 2.1 µs 2.4 µs -10.33%
amortized[InternedInput] 2.1 µs 2.3 µs -9.33%
new[Input] 9.6 µs 10 µs -4.06%
new[InternedInput] 4.3 µs 4.7 µs -7.78%
converge_diverge 125.4 µs 142.7 µs -12.14%
converge_diverge_nested 200.8 µs 154.3 µs +30.11%

@MichaReiser MichaReiser force-pushed the fixpoint-scc branch 2 times, most recently from 50a6d5f to d7e0774 Compare September 30, 2025 13:32
@MichaReiser
Copy link
Contributor Author

Assuming I'm getting this to work. One interesting optimization for memo.block_on is to have a DependencyGraph::all_cycles(queries) method instead. That's much cheaper than iterating over all memos (and only requires aquiring a single lock)

@MichaReiser MichaReiser closed this Oct 6, 2025
@MichaReiser MichaReiser changed the title Run fixpoint per strongly connected component Run fixpoint per strongly connected component (no sync table) Oct 9, 2025
@MichaReiser MichaReiser reopened this Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant