Between those two, Windows by far. That's because the iMac with i5 that's currently available is based on a Kaby Lake CPU (only 4 cores and 4 threads), and is incapable of being upgraded to more than 32GB of DDR4 RAM. As such, that iMac will absolutely choke on 4K material, and is barely suitable for even 1080p.
Ok, I have got the message about performance in "preview mode". Some ppl says that the main reason why they are using iMac is a ready-to-go hardware/software platform (real colors in retina display) and better optimalization in that order. Is anyone there who can confirm what is the best for 4K editing (smooth and comfort work in preview mode).
It's not the OS or software platform. It's the hardware – the CPU and disk setup, in particular.
No quad-core i5 system, whether Windows or Mac, can come anywhere close to comfortably handling 4k content for editing. Sure, you might be able to circumvent the weak CPU by using lower-rez proxies, but when it comes to exporting the video, that iMac would still have to render the 4k original – and that's where lesser CPUs such as that quad-core non-hyperthreadable i5 will become choked.
And most iMacs have, and can only accommodate, a single internal disk for absolutely everything, which severely handicaps the practical disk I/O throughput. The only way that you can add even a second disk to an iMac would be via an external Thunderbolt or USB 3.x connection.
And when you heard others say they use iMac for video editing, they typically use one of those configurations that include an optional and more expensive i7 CPU and not one of those with an i5.
And stay away from the cheapest current iMac configuration if you're going to perform any serious video editing: Its i5 is a lower-power mobile CPU with only two physical CPU cores.
OK pal, according to benchmarks based on Pudget Systems Workstations vs iMac we are thinking about Windows machine. What is more efficient CPU for Premiere in 4K? Do the i9-7960X is overkill or not? 32GB of RAM is enough? And what the best 4K display We can get to beat RETINA.
PS. As I said, working comfort (smooth or something like that I got on my mind) in preview mode is our priority.
The 16-core/32-thread i9-7960X is a bit overkill for 4k editing, IMHO. A better match would be either a 10-core/20-thread i9-7900X or an 8-core/16-thread i7-7820K if you're going to configure a Windows workstation.
And yes, there is a HUGE difference in processing performance between the i9-7960X in your proposed Windows workstation and the i5-7500 that's used in the iMac that you're considering.
And if you do end up choosing an iMac, be sure you get one of the 27-inch models, especially a higher-end one that offers an optional 4-core/8-thread i7 CPU. The 21.5-inch models all have lesser GPUs that may slow down or frustrate your overall editing experience.