You had to go there, didn't you...
As Lebell pointed out, modern 9mm ammo is perfectly capable of stopping an attacker. Add to that the fact that it is easier to control, has a flatter trajectory, and you can carry more ammunition, and it becomes the clear choice over .40 S&W, IMHO.
If you
must have a more powerful round (which I can't imagine you would), look at the 10mm, which mimics the performance of a .41 magnum.