Maybe the following will help:
.40 S&W - 180gr = 968 fps muzzle velocity with 375 ft. lbs. muzzle energy.
9mm - 124gr = 1,181 fps muzzle velocity with 382 ft. lbs. muzzle energy.
It comes down to whether you believe a faster bullet with slightly more muzzle energy is better than a heavier bullet with slightly less muzzle velocity and energy. Different manufacturers change somewhat but what I've shown is an average. By the way, I prefer a .45 for my carry weapon.