This paper reports how and to what extent the mass distribution of a passive dynamic walker can be tuned to maximize walking speed and stability. An exploration of the complete parameter space of a bipedal walker is performed by numerical optimization, and optimal manifolds are found in terms of speed, the form of which can be explained by a physical analysis of step periods. Stability, quantified by the minimal basin of attraction, is also shown to be high along these manifolds, but with a maximum at only moderate speeds. Furthermore, it is examined how speed and stability change on different ground slopes. The observed dependence of the stability measure on the slope is consistent with the interpretation of the walking cycle as a feedback loop, which also provides an explanation for the destabilization of the gait at higher slopes. Regarding speed, an unexpected decrease at higher slopes is observed. This effect reveals another important feature of passive dynamic walking, a swing-back phase of the swing leg near the end of a step, which decreases walking speed on the one hand, but seems to be crucial for the stability of the gait on the other hand. In conclusion, maximal robustness and highest walking speed are shown to be partly conflicting objectives of optimization.