barrel length has not much of anything to do with groups in the since of velocity loss or gain.
That's what elevation adjustments are for.
Now if your rifle has the remote chance of trying to kill something at yardage or your trying to meet velocity #'s to match a BDC reticle then pay attention to velocity, velocity is killing power along with mass.
The ONLY way to pay attention to velocity is to use a chronograph, other than that you are just guessing and basing everything on a guess.....don't care what the manufacturer puts on the box, its wrong or inflated to sell or just simply wrong and various speeds out of yours, mine and his barrel.
Barrel material, type of rifling also have an effect on velocity
Accuracy is arguably better with a shorter barrel all else being equal.
A shorter barrel is stiffer, a stiffer barrel is more consistently accurate than a whippy barrel.
Go too short get real stiff, loose velocity but gain consistency in grouping.
That's only the tip of the iceberg of accurately shooting equipment......... now shooting accurately is an entire different conversation because it really is the Indian not the arrow