Almost every major airline does that.
It's called cost index.
Speed down, save fuel, increase cost due to missed connections and higher wages.
Fly over Russia, increased overflight fees, but shorter flight time. Fly over North Pacific, lower fees, longer flight time.
The computer spits out a route and speed to fly at.