Grouseman, I can only answer this because I have in amongst my few books:
"Understanding Firearms Ballistics" that I once picked up in New Orleans on sale.
Please read this quote, from Chapter 11 on barrels;
The velocity of a 22 long rifle rimfire bullet will slow at about 16 to 18 inches, dependant upon the ammo type and firearm.
At 16 inches there is gas expansion about 37 times its original volume, The 22 has a tiny chamber, and this gas expansion is extended to 44 inches, if the barrel is increased to 19 inches.The 22 short case has an even smaller chamber, and an even higher expansion ratio in the same barrel length.
Years ago testing, by an Eric Hoffman of Hoffman Arms Co. showed an 18 inch barrel length gave the best velocity for the .22 LR cartridge.
An interesting side note: The very high velocity of 4,000 fps is hard to exceed in a .22 calibre regardless of powder charge, because of the barrel's resistance (friction) to the movement of both the bullet and the gas.
Larger centrefires have a slightly higher limit.
The barrel should have nothing in it except the bullet and the push of expanding gas.
The combustion of the powder should be in the cartridge case, not the barrel.
That is why the statement of longer barrel as best, because they let all the powder burn is wrong.
Barrel length are best at lengths (if practical) that lets the gas expansion, be most efficient. As stated combustion is best in the cartridge.
The requirement for longer barrels was stronger in black powder days than it is with modern powders. Today, the need for longer barrel for gas expansion is a fact, but in earlier times this need included time for proper burning.
Occassionally this persuades people in the present time to beleive they need a barrel much longer than is required.
Unquote.......
PS This quote refers to 22 long rifle most specifically.
Cheers