As noted by John Poole of Primate Labs, it seems that the 27-inch Retina iMac with an Intel Core i7-4790K clocked at 4.0GHz has managed to outperform the low-end Mac Pro with an Intel Xeon E5-1620 v2 clocked at 3.7GHz. However it should be pointed out that this is only for single-core performance and that for multi-core performance, the Mac Pros for the most part have trumped the iMac.
This is because the Xeon processors have been optimized for multi-core performance and for applications that might require multiple cores to be used at once. What this means for users is that if you’re after true multi-core performance, the Xeon processors in the Mac Pro would be a better choice, but as Poole notes, if you don’t regularly run heavily-threaded applications and you wouldn’t mind a 5K display, then perhaps the Retina iMac could be worth your consideration.
However we should note that choosing the Intel Core i7 version of the iMac would cost you almost as much as the base model Mac Pro, but like we said you do get a slimmer package and a 5K display, but there will be differences in the RAM and GPU which you will have to decide which is will best suit your needs.