The S&W .40 twist rate is 1-16 and the standard 9mm is 1-10. There are variants. Colt makes a Government Model 1911-A1 in 9mm with a 1-16 twist and Springfield Armory had a 1-16 twist in their 9mm and .40 S&W 1911-A1’s.
I can only guess at the rifling twist on my M&P9 but it appears to be less than my 9mm Government Model just watching a dot on the cleaning rod as I run it with a tight patch into the barrels. The M&P is RH twist, the M1911 is LH.
If the one really is 1:16 and the other 1:10 it doesn't seem to make any difference shooting my normal 124gr M882 Ball 9mm ammo from either.