The-OpenROAD-Project / OpenSTA

OpenSTA engine
GNU General Public License v3.0
386 stars 167 forks source link

Speed up findAxisIndex by 25%. #209

Closed rmlarsen closed 6 months ago

rmlarsen commented 6 months ago

This is done by hoisting the instructions to handle ascending vs. non-ascending out of the inner loop in the bisection search. In our application, this function is the largest contributor to total runtime.

This change also fixes a latent bug potentially invoking undefined behavior (accessing element with index -1) if the table is empty.

Pivoted flame graph before: image

Pivoted flame graph after: image