Again, sorry for the long delay here. This is a good question and I have wondered something along similar lines. So I ran a few numbers in QuickLOAD. Here's the short of it, the optimal powder for a given load, is still the best powder regardless of barrel length. At least, in this example. (One could take this to extremes and compare a 2in barrel to a 30in barrel and there may be a difference).
One of the ways we can measure this is to look at the Velocity per Grain of powder. This gives use a simple but quick measure of the best powder for the load. The higher the number the better. While the efficiency goes up with the longer barrel, the powders maintain the same relative performance.
FPS per Grain.png
As we can see, the optimal powders for this load are the faster burning powders, not the slower burning CFE 223 and the AR Comp which like heavier bullets. They yield more "Bang for the Buck". Pun intended. If you are curious to see how much velocity you are sacrificing with a 10.5in barrel over a 20in barrel. That chart has been included below.
Velocity Verses Barrel Length.png
Also interesting to note is the muzzle pressures for all of the powders are pretty similar at both 10.5in an 20in barrel lengths.
Muzzle Pressure vs Barrel Length.png
Anyway, I hope this helps to scratch that curiosity.