clusterlin: track suboptimal chunks (optimization)

This avoids adding them a second time to m_suboptimal_chunks when they
happen to already be there.
This commit is contained in:
Pieter Wuille
2025-10-15 21:35:58 -04:00
committed by Pieter Wuille
parent 63b06d5523
commit 1daa600c1c
2 changed files with 36 additions and 11 deletions

View File

@@ -403,13 +403,13 @@ inline uint64_t MaxOptimalLinearizationIters(DepGraphIndex cluster_count)
static constexpr uint64_t ITERS[65] = {
0,
0, 4, 10, 34, 76, 156, 229, 380,
432, 517, 678, 896, 1037, 1366, 1479, 1711,
432, 517, 678, 896, 1037, 1366, 1464, 1792,
2060, 2542, 3068, 3116, 4029, 3467, 5324, 5512,
6481, 7161, 7441, 8183, 8843, 9353, 11104, 11269,
12354, 11871, 13367, 14259, 14229, 12397, 13581, 17774,
18737, 16581, 23217, 24044, 29597, 28879, 34069, 34162,
36028, 26227, 34471, 37212, 40814, 29554, 40305, 34019,
36582, 55659, 39994, 41277, 42365, 52822, 60151, 67035
11791, 11871, 13367, 14259, 14229, 12397, 13581, 18152,
18737, 16581, 23217, 24044, 29597, 29030, 34069, 34594,
33630, 26227, 34471, 38815, 40814, 31182, 40305, 34019,
36582, 55659, 39994, 41277, 42365, 52822, 59733, 67035
};
assert(cluster_count < std::size(ITERS));
// Multiply the table number by two, to account for the fact that they are not absolutes.