optimizer: simplify crossover algorithm

1 job for master in 3 minutes and 11 seconds