The shorter barrel is potentially more accurate.
All things being equal, if two barrels are of the same contour, the shorter barrel is stiffer, hence it is potentially more accurate. Long barrels tend to produce higher velocity, but much depends on the particular loads in question. For example, a .308 firing a 155 gr bullet might loose 150 fps from a 20" barrel compared to a 24" barrel, but the same rifle might only loose 50 fps if it was loaded with a 200 gr bullet. The 200 gr bullet is loaded with a smaller powder charge, so would tend to reach it's maximum velocity in a shorter period of time.