Skip to content

Accelerate connection sets merging with union-find #2824

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

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Conversation

YingboMa
Copy link
Member

Baseline:

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 100)
  0.960393 seconds (8.15 M allocations: 540.022 MiB, 4.47% gc time)
0.888558584

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 200)
  2.593054 seconds (17.95 M allocations: 1.131 GiB, 3.75% gc time)
2.465012458

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 300)
  5.065673 seconds (29.41 M allocations: 1.821 GiB, 5.90% gc time)
4.861177375

PR:

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 100);
  0.748587 seconds (7.61 M allocations: 513.135 MiB, 7.15% gc time)

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 200);
  1.681521 seconds (15.75 M allocations: 1.027 GiB, 7.71% gc time)

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 300);
  2.931254 seconds (24.43 M allocations: 1.590 GiB, 11.97% gc time)

Baseline:
```julia
julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 100)
  0.960393 seconds (8.15 M allocations: 540.022 MiB, 4.47% gc time)
0.888558584

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 200)
  2.593054 seconds (17.95 M allocations: 1.131 GiB, 3.75% gc time)
2.465012458

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 300)
  5.065673 seconds (29.41 M allocations: 1.821 GiB, 5.90% gc time)
4.861177375
```

PR:
```julia
julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 100);
  0.748587 seconds (7.61 M allocations: 513.135 MiB, 7.15% gc time)

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 200);
  1.681521 seconds (15.75 M allocations: 1.027 GiB, 7.71% gc time)

julia> @time run_and_time_julia!(ss_times, times, max_sizes, 1, 300);
  2.931254 seconds (24.43 M allocations: 1.590 GiB, 11.97% gc time)
```
@YingboMa YingboMa requested a review from chriselrod June 27, 2024 19:04
@YingboMa
Copy link
Member Author

image That's most the low hanging fruits in connection merging. Hashconsing and a more closed symbolic type would be the way to further speedup the front-end.

CC: @bowenszhu @ChrisRackauckas

@ChrisRackauckas
Copy link
Member

bariess comes up a lot, is this RC circuit?

@YingboMa
Copy link
Member Author

bariess comes up a lot, is this RC circuit?

No, it's the thermal fluid model.

@ChrisRackauckas
Copy link
Member

Oh, the better bariess is back on the menu?

@YingboMa
Copy link
Member Author

image

Oh, the better bariess is back on the menu?

I don't think so. Bareiss there is just a profile fluke. I ran the profile again and it disappeared. I must have forgotten to clear the profile cache before taking the screenshot.

@YingboMa
Copy link
Member Author

The test failure seems unrelated.

@YingboMa YingboMa merged commit 5f2a594 into master Jun 27, 2024
22 of 23 checks passed
@YingboMa YingboMa deleted the myb/union_find branch June 27, 2024 22:48
@YingboMa
Copy link
Member Author

@ChrisRackauckas the test failure seems to be due to the printing change.

@ChrisRackauckas
Copy link
Member

I fixed that on master? This must've branched from an earlier master.

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.

3 participants