Tom's just did a detailed review on this very question:
https://www.tomshardware.com/features/amd-ryzen-9-3900x-vs-intel-core-i9-9900k-gaming
If only gaming, the 9900k (or the 10900k which is even faster) is the "best" gaming CPU.
There are PLENTY of charts and averages in the article that show what the difference is. That said, unless gaming at 1080p (or lower), there's no way I would personally pay more for the 9900k or 10900k, when the Ryzen 3900X is cheaper and is pretty much right there in terms of gaming experience.
I saw that, and while informative, I found the results slightly misleading for a couple of reasons, and it's why I find Gamer's Nexus more useful in many cases.
Specifically, running the 9900K (or any K series CPU) at stock settings is completely missing the point. Stock 3.6Ghz 9900K with limited turbo is dramatically slower than a tuned OC, which is the entire point of the K CPUs, especially with the included H150i (or in my case, a DH15 Noctua Carbon). Similarly, extremely mediocre speed 3200 Ram also cripples that build.
The same thing is true of their AMD build, not so much OC, but paired with the same awful 3200 DDR4 with poor latency, and just looking at the amatuerish state of the builds, I very much doubt they tuned the Ram performance. 3600 Ram at CL15 or less with 1.8Ghz IF is sort of the widely achievable standard for a good Zen2 build, and gives a nice uplift over generic settings.
It's a decent comparison for someone looking at prebuilts, but that kind of makes the difference between a 9900 and 9900k pointless.
A 5Ghz all core 9900k/10700k with tuned 3600-4000 Ram, 4.5-4.8Ghz uncore, etc is a completely different league compared to stock 9900k. And the Ryzen build would get a less severe but still relevant uplift from a solid tune with better ram.
Just as a reference point on this, the lowly 10600k blows past the stock 10900k (and 9900k of course) with an all core OC and tune. That's how enormous the difference is. The stock K series without MCE/all core performance is VERY limited and weak, presumably to pair with weak HSFs and cheap mobos.