Per core, the i5 would be better. The fx 8350 is a bit power hungry when it gets overclocked, but does do better in multi threaded applications. Not many games actually use more than number of threads that the i5 has.
If you want to go with the fx 8350, I'd suggest maybe getting an 8320 + cm hyper 212 evo + gigabyte 970 ud3p then.