This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit d0f2439
committed
perf: hoist base spread computation out of inner candidate loop in findTopKSeeds
Fixes #26. The monteCarlo(selected) call was being recomputed for every
candidate node in the inner loop, but selected doesn't change during
candidate evaluation. This wasted V * numTrials simulations per outer
iteration. Now computed once before the candidate loop.1 parent cb9ccf7 commit d0f2439
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
316 | 326 | | |
317 | 327 | | |
318 | 328 | | |
| |||
321 | 331 | | |
322 | 332 | | |
323 | 333 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
| 334 | + | |
332 | 335 | | |
333 | 336 | | |
334 | 337 | | |
| |||
0 commit comments