I don't believe barrel length is the primary factor to consider when exchanging ammo between rifles, and I have practical experience in this regard.
2 different lots of .308 Win ammo were tested in several rifles. One lot was Federal Gold Medal Match with Sierra 168's and the other was handloads with new WCC60 cases, 44 grains of IMR4064 under Sierra 168's using RWS 5341 LR primers. Here's the rifle list with the barrel particulars:
Service rifles tested with an aperture front sight:
* M14NM, 22" Obermeyer heavyweight barrel, 1:11 twist.
* M1, 24" Springfield Armory (arsenal) standard service barrel, 1:12 twist.
Bolt guns tested with a 20X scope:
* Win 70, 26" Hart barrel. 1:11 twist.
* Win 70, 28" Hart barrel, 1:11 twist.
* Win 70, 30" Obermeyer barrel, 1:12.7 twist.
* Paramount action, 32" Kreiger barrel, 1:13 twist.
They all shot about 2/3 MOA at 600 yards with 15-shot test groups.