The test results that I have read and the test printouts that I have seen show that the highest pressure occurs in the first couple of inches of the barrel even with the slowest burning powders. Even with the slowest burning powders it is all burned within an inch of the chamber. If you have a barrel that is longer than 2 inches your 270 is burning all the powder in the case. That muzzle flash is because of the super heated gasses that are escaping before they have time to cool. Do you lose velocity with a shorter barrel? YES! the hot gasses continue to push against that bullet as long as the pressure generated is higher than the drag on the bullet in the barrel. Can you get some velocity back by using faster burning powders? NOT according to the studies that the NRA, Hodgdon powder company and a few others have published throughoout the years. If you could, then they would be listed as such in the manuals. Do you lose muzzle flash with faster powders? YES! the pressure drops off faster and with that pressure the temperature drops too! That pressure drop is also what keeps you from getting more velocity with the fast powder than you get with the sloiwer burning powders. The best powder for any load depends completely on the weight of the bullet and the available space for powder. You can only use so much powder until peak pressure goes over what is safe so you can't put 40 grains of Bullseye in a 270 with a 4 inch barrel and get good velocity before it turns into a hand grenade. By the same token you can't get enough of H450 into a 38 special case to get the pressure high enough to push a bullet fast enough to make it worth doing.
The powders that give the highest velocity will always give the highest velocity - regardless of the length of your barrel!
I've actually experimented in depth on this subject, and yes, in this case as well as in most, this is true. In small bore bottle neck cases though, it often works a lot different. It's way to involved for me to "single finger" type it here, but here is one case of it...
I was loading AA-2015 with 40g Balistic Tips about 12-14 years ago in a Browning A-Boly II Varmint(it's what started my little study). I actually ended up loading in 1 tenth increments to watch the velocities. After I reached my maximum velocity, it started falling off with each additional tenth. The only conclusion I could come to was that unburned powder was compressing against the base of the bullet, adding weight, and friction, therefore reducing my velocity.
I set up a backstop made of various materials untill I found a combo that would catch the powder exiting the barrel, and just as I thought, the amount of powder leaving the barrel was higher in direct relation to increases in my charge weights. I tested it over, and over, and came up with exactly the same results.
This alone proves to me that all the powder is not burned up in the first few inches with some combinations. I've since found quite a few similar situations using slow powders in various other bottle neck rounds.