def bench_optimizer(optimizer, param_grid):
 return sum((apply_optimizer(optimizer, func, a, b) for (func, a, b) in param_grid))

def bench_optimizer ( optimizer , param_grid ) : return sum ( ( apply_optimizer ( optimizer , func , a , b ) for ( func , a , b ) in param_grid ) )
find roots for all the functions .