Don't recalculate constants at every call in isqrt.

This reduces CPU usage by about 70% when clicking on items or empty area on PCB, or when with an item selected just moving the mouse (tested on a complex board). Also improves routing performance.

Profiler data (see sqrt_helper<__int64>)

Moving the mouse with an item selected:

image

Edited by dsa-t

Merge request reports

Loading