A line gives us the minimum distance from $A$ to $B$. A cycloid gives us the minimum traveling time of a point mass from $A$ to $B$ (under constant gravitational acceleration $g$).
What about the curve that maximizes the average speed from $A$ to $B$?
There's no upper bound for the average speed. The speed is determined by the height; the deeper you go, the higher you can make the average speed.