optimized estimation of gap penalty (run time only)