Commit a666ef9
authored
Speed up
Avoid unnecessary repeated toposorting of `w` during `_collect_heaviside_root`.
Sort and substitute only once after all roots have been collected.
This saves a couple of seconds for models with heavily nested piecewise functions.DEModel._collect_heaviside_roots (#2977)1 parent 11781f5 commit a666ef9
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2462 | 2462 | | |
2463 | 2463 | | |
2464 | 2464 | | |
2465 | | - | |
2466 | | - | |
| 2465 | + | |
2467 | 2466 | | |
2468 | | - | |
2469 | | - | |
2470 | | - | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
2471 | 2475 | | |
2472 | 2476 | | |
2473 | 2477 | | |
| |||
2507 | 2511 | | |
2508 | 2512 | | |
2509 | 2513 | | |
| 2514 | + | |
2510 | 2515 | | |
2511 | 2516 | | |
2512 | 2517 | | |
| |||
0 commit comments