If we don't consider air friction with the ball, then you can see two different effects: an increase in length of the path and an increase in velocity of the ball. Turns out that the second effect more than compensate the first.
An exact calculation isn't simple for arbitrary shapes, but we can see a simplification: let's say from (1) to (2) the length is $L$. At (1) both balls have velocity $v = \sqrt{2 g h}$ from conservation of energy. So ball A goes from (1) to (2) in time $t_A = \dfrac{L}{v} = \dfrac{L}{\sqrt{2 g h}}$.
Second assumption: instead of a smooth curve, ball B sees the path curving down at 45° with a vertical drop $d$, then an horizontal path with length $L - 2\sqrt{2} d$ and finally the path rises with an angle of 45° and goes back at the same height as before. If the ball isn't too fast this assumption is good enough to avoid jumps and recoils.
Third: to simplify even further, let's assume the balls are point-like.
How much time does B need to go from (A) to (B)? From (A) to the bottom of the hollow it's an accelerated motion with acceleration $a_1 = \frac{\sqrt{2}}{2} g$ and a length $l_1 = \sqrt{2}d$, so the time needed is $t_1 = 2\dfrac{\sqrt{h + d} - \sqrt{h}}{\sqrt{g}}$ and has a velocity $v_1 = \sqrt{2 g (h + d)}$.
Second part, this is simpler, it takes $t_2 = \dfrac{l_2}{v_1} = \dfrac{L - 2\sqrt{2}d}{\sqrt{2g(h+d)}}$, the velocity is the same.
Third part, we are almost there. Now the ball is decelerating ($a_3 = -a_1$), but $t_3 = t_1$ and the velocity is again $\sqrt{2 g h}$.
The total time needed by ball B then is
$$t_B = t_1 + t_2 + t_3 = 4\dfrac{\sqrt{h + d} - \sqrt{h}}{\sqrt{g}} + \dfrac{L - 2\sqrt{2}d}{\sqrt{2g(h+d)}}$$
With a common denominator it becomes:
$$t_B = \dfrac{2\sqrt{2} (2h+d) - 4 \sqrt{2h(h+d)} + L}{\sqrt{2g(h+d)}}$$
Yet again it's not so easy to show that this formula represents a smaller time than $t_A$, so let's see a few properties: if $d=0$, $t_B=t_A$, as expected. We can ask if there are other solutions to the equation $t_A = t_B$. There is one other, $d = \dfrac{L(L+4\sqrt{2}h)}{8h}$, but if we calculate the length of the second segment, it turns out it's $L-2\sqrt{2}d = - \dfrac{L(\sqrt{2}L + 4h)}{4h}$, which is negative and thus has no physical and geometrical meaning.
That means that for this particular path there is no other depth $d$ that lets ball B run the whole trajectory in the same time as ball A. So it has to be always less or always more. We can check with a random value, for example $d = h$, and we obtain $t_B(d=h) = \dfrac{L}{2 \sqrt{gh}} + (3\sqrt{2}-4) \sqrt{\dfrac{h}{g}}$. $t_B < t_A$ for $L > \dfrac{6\sqrt{2}-8}{\sqrt{2}-1}h$, which is a pretty good condition since $L$ must also be greater than $2\sqrt{2}h$, which is even bigger.
So, we show that the longest path takes less time in this particular configuration. We can imagine it's pretty much the same for any other similar configuration, but it would be less intuitive to calculate.
All the calculations are left as exercise for the reader, I don't want to spoil all the fun. I hope they are all correct.
Just wanted a chance to use the word :)
– DJohnM May 13 '15 at 23:44