Ryzen isn't "a CPU", but rather a cluster of CPUs. The 3900X consist of 4 CCX units (core clusters), each with 16 MB L3 cache. Since one CCX can't use the L3 cache from another CCX, both 3900X and 9900K have 16 MB L3 cache for single core operation.
I would say 9900K will be fastest based on the fact that it always wins when people benchmark them against each other for single core performance. Also the civ4 engine highly depends on DRAM latency.
However AMD recently announced their next generation ryzen, which will be pin compatible with the existing CPUs. This means going ryzen will allow you to replace the CPU next year to something, which is likely even better than anything available today. Intel usually requires new motherboards if you want a new CPU.
Also be aware since AMD use a standard CPU socket, you can fit 3900X into a budget motherboard, which can only supply enough power for 8 cores. This means you should really pay attention to the capacity/quality of the VRMs.
You should however be aware of history. Intel struggled to be ahead of the competitors and with Pentium, they managed to do just that. They finally managed to make something where the clones were noteworthy slower. This lasted for decades, but then AMD is catching up in latency and then came the hardware security bugs (meltdown etc). It was then revealed that the way Intel managed to stay ahead of the competition was to not do some hardware level security checks because nobody will notice anyway. Then came the internet and also AMD didn't do this cheat. This means while AMD has such issues too, Intel is hit harder because they never fixed the cheat they used back in the day. This means it's not unreasonable to assume that 3900X can become faster than 9900K if the development with security patches continues as it has developed recently.
I'm not sure what I will recommend today. It was easy prior to Ryzen where it would be "whatever has the highest single core performance from Intel". Now it's way too complex even before taking into account that you can get great single core performance from something like 3950X something expensive, which is designed for many core operation and isn't cost effective for single core gaming.
You should also consider how much better it is to upgrade. New CPUs tend to have many cores, but improvements in single core performance isn't as great as we would like to think. Take for instance 4790K. Running at full boost speed at all time for single core performance (requires 50-60 W, not unrealistic to cool, 4th gen didn't boost much) it will provide the same performance as a 9900K when used for single core performance at base clock (as in not boosting). This means going from the 4th gen flagship to the 9th gen flagship in single core performance gains.... well nothing unless you cool your new CPU for serious boosting. In fact buying a CPU today at the same price as the 4790K used to cost will likely give you twice the cores, but reduced single core performance. In other cases upgrading will boost single core performance significantly. This means upgrading is beneficial for some people and not for other people even if they upgrade from equally aged computers.
AMD did a lot of good when it gave us Ryzen, but the idea of adding lots of cores (an idea, which Intel has copied) means the market for good single core performance has become way more confusing.
Generally speaking, look for single core benchmarks for what you want to compare and you should also prefer low latency memory. How to figure out which memory is good is also something, which is way more complex than "pick the expensive one/the one with the best numbers". What you want is the one with the lowest highest "frequency divided by CAS numbers", but at the same time you want high frequency because that will give you more MB/s.