gyrfalcon wrote:That's somewhat like saying engine size has nothing to do with the speed of a car...unless
You're right that it kind of does, but not in the way most people think.
Accuracy of a rifle or pistol is it's ability to put the bullet in the exact same place across some given distance. The bullet has to travel through the air, so we need a way to make the bullet behave in the air the exact same way despite variations in the air between the shooter and the target over time. This is done by imparting a very fast spin on the bullet so that it remains consistently oriented throughout the arc of it's travel. This is called gyroscopic stabilization, where the weight and momentum of the spinning bullet will resist external forces (variations in atmospheric conditions) that are applied to it that would otherwise alter it's travel path.
The velocity of the bullet as it leaves the barrel is proportional to the length of the barrel. The faster the bullet travels through the barrel, the faster the spin that is imparted on it via the rifling. As long as the barrel is long enough that the rifling is able to spin the bullet fast enough to properly stabilize it, adding more barrel length will *not* increase its accuracy. In fact, you could potentially add enough barrel to increase velocity to the point where the spin rate is too fast, which will over-stabilize the bullet. An over-stabilized bullet will remain consistently oriented in space, rather than consistently oriented across it's arc of travel, meaning that at the end of it's arc the bullet will not be moving tip first through the air, it will be moving 'tip up' at the angle the round was fired, which will decrease its accuracy.
This is why heavier bullets need a faster twist rate to stabilize. Heavier bullets resist acceleration more than lighter ones, meaning their velocity will be slower leaving the barrel. Slower bullet = slower spin, so a barrel designed with heavier bullets in mind will have a faster twist rate to get it's spin fast enough to stabilize the slower moving bullet. It's also possible that an extremely over-stabilized bullet will be spinning so fast that it will lose its copper jacket and disintegrate in the air before ever hitting the target. Try shooting cheaper 40gr bullets through an AR-15 with a 20" barrel with a 1:7 twist and you'll see what I mean.
When you get into rifles, there are other factors that can effect accuracy that can be effected by barrel length - stiffness and harmonics. However, these are not effected by barrel length specifically, but rather the overall geometry of the barrel. In general though, shorter barrels are stiffer than longer ones, so there is a point where if all other barrel geometry stays the same, increasing the barrel length beyond a certain point will decrease accuracy because there will be more flexibility across the length barrel.
So, while barrel length can indirectly have an effect on the overall accuracy of a weapon, there is a wide range of lengths where accuracy is not affected at all, and most well engineered weapons are manufactured within that range.
That's my "I'm bored and have nothing better to do than ramble on the internet" answer. You are now free to continue on with your lives