The M&P is a great gun. My friends who own them shoot them well and love them. I have nothing bad to say about the gun.
I have shot both, and prefer Glocks. I have stood in a range stall and fired both guns, using the same ammo and targets, and the same distances, and I shoot the Glock WAY better. But that's me.
If you can, do the same thing. Then get the one that YOU shoot way better or makes you happier in whatever way you choose. Don't forget to take into account different features that are available from the get-go, and also after-market parts.
"An armed society is a polite society." Robert A. Heinlein
"After a shooting spree, they always want to take the guns away from the people who didn't do it. I sure as hell wouldn't want to live in a society where the only people allowed guns are the police and the military."
William S. Burroughs