Agree with Killer. To compare these two CPUs, you need to take into account three primary factors which affect a cpu's performance.
1. IPC (Number of Instructions the cpu processes per clock cycle). The cpu with higher IPC will be faster because in the same time it would complete more tasks than one with lower IPC.
2. L3 cache. Presence of L3 caches makes cpu intensive tasks run better than when it is not there. between two cpus which are identical in every aspect though one lacks the L3 cache, than this cpu will be 20 % slower in certain cpu intensive tasks such as gaming or rendering.
3. Number of cores: More cores are helpful in cases where a program/software can utilize as many resources as are available. A rendering software like flamingo raytrace for instance engages all cores and logical HT cores in a quad core i7 3770K and an i7 3930K (we performed this test recently). If both cpu's run at the same clock speed (and though they are from different generations) the two extra cores in the 3930 help it finish the render faster. But this is only because the software can engage all available resources(cores).
Going back to the i3 vs the 5800K, the i3 has better IPC and has L3 cache. The 5800K has more cores but these additional cores do not completely offset the advantage that the i3 has. I've written all this so that you may be able to better comprehend the link below
http://www.anandtech.com/bench/Product/675?vs=677
Remember this only objectively answers your question. Objectively the i3 may be 1.4 seconds faster in retouch artists speed test. But whether it matters to you or not is entirely your take on the situation.
hope this helps
-Satyam