Just my guess but I think the difference in the barrel length will only affect your ability to be accurate with a longer sight radius on the 24"er. The difference provided by a longer barrel is pretty insignificant if any compared to other factors like how well the rifling is machined, load selection to suit the individual rifle, and mostly your skill. I wouldn't bet my money on which would be more accurate of two different production rifles with 4" of barrel length difference. There is almost always a velocity difference in barrel lengths depending on the ammunition of anywhere from 25 to 50 fps or more. That might give you a bit flatter trajectory from one or the other but not much.
If barrel length were a reliable factor in accuracy you would see the modern smokeless powder high end target rifles with 30" barrels. But remember, this information is worth what you paid for it.