perf(lp) : slightly improve performance of solve_By

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>