Here's SAAMI specs on muzzle velocity vs barrel length. It's based on each barrel length having the exact same chamber, bore and groove dimensions.
If both barrel length's one is comparing velocity with don't have the same internal dimensions, the data will be incorrect. I've shot the same ammo (.308 Win. Fed. Gold Medal Match) through a 26 inch barrel with oversize bore and groove dimensions (Win. 70 .308 Win. factory match rifle, .301", .3085") that had a 50 fps slower muzzle velocity than a 22 inch one with bore and groove diameters a bit smaller than SAAMI minimum specs (M14NM match grade service rifle with tight bore and groove diameters, .299", .3075").