I have never been disappointed with a bigger heavier bullet. Having shot several pigs with both 9 and 40, I'm going to say I prefer 40. But take that from a guy whose EDC is a 1911-A1, which also does well on pigs.
The only time I carried a .40 S&W was when the department gave me no other choice.
To this day, I've never liked it. I get old bullet tech with 9mm sucked and the .40 was basically at plus P velocity, but .45 beats it everytime in my opinion. The 4 extra rounds from a P220 to P226 just wasn't worth the squeeze.
I look at pistols as "o'shit guns" and purely defensive just to get me to a long gun.
I have never been disappointed with a bigger heavier bullet. Having shot several pigs with both 9 and 40, I'm going to say I prefer 40. But take that from a guy whose EDC is a 1911-A1, which also does well on pigs.
Sometimes "placement" isn't available, that is when penetration becomes paramount, I have found lighter faster bullets that open up lack the ability to penetrate far enough when presented with a less than ideal target area.
I know from experience a full pressure 40sw 180gr lswc & xtp hp and 45acp +p 200lswc & xtp hp got plenty of weight penetration for side to side and end to front (asshole to exit out of neck in 100lb+ animal with 40sw 180grlswc)
Edit to add The 40 was from a 16" barrel hipoint carbine