We present a genetic algorithm for the all-pairs shortest path problem that uses both mutation and crossover. A rigorous runtime analysis shows that the use of crossover significantly improves the optimization time of the algorithm from $\Theta(n4)$ to $O(n^{3.5+\epsilon})$. This is the first rigorous analysis showing the usefulness of crossover for a non-artificial problem.