24" is fine not realy depending on the caliber , I have a 308 with a 20" barrel and it will shoot accurately to 1000yds with the right bullets (175gr Bergers)
Depending on the caliber will make a big differance in what kind of velocity your loose , in a 308 the velocity loss from a 26" to a 22" is only about 50fps where in a 300 win mag it might be 100fps-150fps
Generaly shorter barrels will be more accurate than a long er one due to the short barrel being stiffer and haveing less barrel "whip"