attempt to speedup bisect, but cant use OpenMP now, so a bit slower... but less cpu load...