Looking at purely CPU performance right now, the 9900K slightly takes the cake.
Looking at more things surrounding the CPU, i.e. the platform and the features, it's really hard not to recommend the 3700X over the 9900K. We don't know what the future looks like, but Ryzen is spreading everywhere and will be used everywhere. Support for it will only increase. Only you can answer if you are willing to lose a little bit of performance to count on this, or not.