Quite a discussion about this on Benchrest Central a while ago.
benchrest.com/forums/showthread.php?t=65968 (copy and paste into your own www )
The following information is from Mark White's book "The Ultimate Ruger 10/22 Manual and User's Guide" . Apparently, he cut a 28 inch barrel two inches at a time and measured for muzzle velocity.
Ruger 77/22; Remington Standard Velocity .22 LR ammunition
Barrel Length/ Velocity
28 1095
26 1107
24 1119
22 1129
20 1138
18 1149
16 1157
14 1149
So, based on this (that ammo and that gun), it would seem maximum velocity in a .22 is acheived at 16" with a loss of about 5 fps/inch over the next 12 inches.