Going to extremes, a pencil profile 7" barrel will be more consistent (accurate) then a 24" pencil profile. The shorter the barrel the stiffer, and more accurate it is.
The longer the barrel the more time it has to accelerate so the more velocity it has at the muzzle. In longer distances the faster the projectile travels the less time environmental factors have to effect it. IE wind, gravity, corelais etc. So the more consistent it becomes.
If you are shooting less than 200 yards, hey my 7" ar pistol does just fine. If you are going longer you want more velocity.