Many tests have been conducted on this very topic. I've seen mixed data because a XX inch barrel was compared to a XX inch barrel in a totally different gun. The only real good test I've seen was when a 24 inch 30-'06 was chronographed, tested for group size, then cut off. Each half inch barrel cut was chronographed and grouped with a variety of different weight bullets and documented. The cuts continued to 16" (minimum legal length). Velocity decreased with each cut, but not a fixed amount.
Lighter weight bullets suffered the most loss in velocity. This is because they have more powder to burn and they are higher velocity to start with. Bottom line, you won't loose enough velocity in a hunting gun to worry about. Accuracy was not affected much, in fact it improved at some barrel lengths. For long range and tactical shooters, they want all the length they can get.
I have also read that a 30-'06 would continue to gain velocity up to a 36" barrel. Now that would be a bugger to tote around!