Will you be overclocking? I would assume so, but if not, go for the i5 3350p, or perhaps the 3470.
If you are overclocking, the 3570k would be better, because Intel (usually) gets larger returns on overclocking than AMD's CPUs.
That being said, I would personally go for the FX 8320. Reason being is that the AM3+ socket isn't dead, so you still have an upgrade route available in the form of Steamroller, whereas the LGA 1155 socket is completely dead, with your only upgrade option being an i7, which offers little extra performance over the i5, or a new motherboard for a newer family. The FX 8320 is cheaper than an i5, and Steamroller CPUs aren't likely to be much more expensive. You won't need to buy a new motherboard for a Piledriver CPU either, probably.
Additionally, programs are soon likely to be more highly-threaded, making the 8 cores extremely attractive.