I have a Gen3 G17 in addition to several M&Ps ( 40C and 45 ). In my opinion, the G17 is accurate, dirt simple, and relaible ( trust my life that it will go bang when needed ). With this said, its grip is very 2x4 like, not sure if Gen 4 fixes this feel. I prefer the M&P as it does all the above and fits very well in the hand.
M&P45 is a huge improvement over the G21 grip size. I can appreciate why Glock developed the 45GAP to reduce grip size closer to G17 size.
I did fire the G26 vs. M&P9c ( and 40c ). I found the M&P in either caliber was easier to grip (quickly) with the small lenth grip of these sub compact pistols. I ended up buying the 40c as recoil was very controllable, even in small pistol.
As others have said, key is how it feels in your hand.