The-OpenROAD-Project / OpenSTA

OpenSTA engine
GNU General Public License v3.0
404 stars 172 forks source link

Optimize insert operations following find operations #222

Closed RRozak closed 1 month ago

RRozak commented 7 months ago
Often scenario is that insert operation follows find operation if the element isn't found. In this case, looking for the element is performed twice. This can be optimized by using [] operator and getting a reference to the element that was just added if it hasn't existed. I tested it on 10 runs of black_parrot. It saves a few seconds in cts and grt phases. Master: stage min time [min] avg time [min] med time [min] max time [min] sum time [min]
4_1_cts.log 5:04 5:16 5:16 5:22 52:44
5_1_grt.log 11:07 11:18 11:17 11:31 113:03
My changes: stage min time [min] avg time [min] med time [min] max time [min] sum time [min]
4_1_cts.log 5:04 5:11 5:11 5:18 51:50
5_1_grt.log 10:57 11:12 11:16 11:20 112:04
maliberty commented 1 month ago

Issues or PRs should be filed with https://github.com/parallaxsw/OpenSTA if still relevant. This is effectively a fork (though not strictly for historical reasons).

maliberty commented 1 month ago

Issues or PRs should be filed with https://github.com/parallaxsw/OpenSTA if still relevant. This is effectively a fork (though not strictly for historical reasons).