I read this somewhere, I don't recall where. This will be generic & not ammo nor gun brand specific as well.
For a handgun, the advertised velocity will usually be from a 6" barrel. For every inch below 6", deduct 50fps. IOW, a 4" bbl will be 100fps slower than the 6".
For a rifle, I believe it was a 20" bbl, but it may have been 22"? I'm going to use 20" since that's an AR bbl length standard. They said to deduct 100fps per inch below the 20". Thus a 16" bbl will be shooting 400fps slower.
Yes, I know there's all sorts of "what ifs?" in there that one could drive a Mack truck through. Short bbl ammo, for example. Quick burning powder, etc. Type of rifling is another variant as I believe H&K pistols typically shoot a bit faster (not sure how much) than say a XD or M&P. Less friction is what I was told when I asked about it. Traditional land & groove rifling uses a bit more of a "grab" in order to extract accuracy.
OP, there won't be a dime's worth of difference in "effectiveness" in the guns you're looking at. You may well shoot better with a medium to full size gun due to the longer sight radius. Or you might stumble onto something like I have with my USPC S/S .45acp that shoots insanely accurate using cheap, bulk PMC ammo. As already mentioned, find the gun that fits your hand the best & the one you shoot the best. (They're not always the same, IMO.) Don't put a huge amount in stock with the accuracy of a range rental gun as they're not cleaned too often, if at all. Don't be worried if your first choice turns out to not be your best choice. No one says you can't trade it off or sell it for something else.
My opinion(s) is worth exactly what you paid for them.