You didn't take into account that even the 7870 can be overclocked very high (20%+ instead of 30% on the 7850), I am talking of nearly stock volts here. So an overclock 7870 will reach in the 7950 stock plus terrain, definitely faster than any overclocked 580 and sometimes perhaps close to or faster than a stock 7950, once you overclock it 20-25%+ that is.
So the difference will always be there. If you want better performance, you need to go for a 7870 if your budget permits. If not, the 7850 is a decent card as well
And a stock 7870 is faster than a 570/6970 and is within 10%+- performance of a 580. Once you overclock it is like 5-15% faster than a 580 at the very least, perhaps 20%+ once overclocked enough

But that might need after market cooling
