Here are some Quickload simulations. I let Quickload pick the powders and loads (typically about 90% SAAMI max.
bullet ................... ........ 24" ....30"
155 grain Berger VLD 2936 3082 56 grains Reloader 17. Used 3.34" cartridge oal.
210 grain Berger VLD 2576 2709 58 grains IMR 7i828 SSC . Used 3.5" cartridge oal.
This is only to show the effect of an extra 6" barrel length for a 30-06. Only the barrel length was changed going from 24 to 30 inch. Bottom line is that the extra 6" adds about 5% more velocity which is about 10% more energy. It helps heavy bullets slightly more than lighter bullets.