If you are in competition what type and your division may restrict what you can do.
But the best performance I get out of a compact Glock is the 19 with comp. Personally, I find the 9mm faster, easier to control and has bigger magazine capacity than the 40 S&W.
The compensator is a game changer, it reduces flip, less recoil (you will probably want a weaker recoil spring) and the added length makes it feel more stable.