Gaming speed, cores and clocks
On our gaming index the Ryzen 7 5800X scores 66 and the Ryzen 7 5700X scores 62, about 6% faster for gaming. That gap is small and mostly shows up at 1080p with a very fast graphics card.
The Ryzen 7 5800X has 8 cores and 16 threads, and the Ryzen 7 5700X has 8 cores and 16 threads. Core counts are the same, so cache size and clock speed decide the difference. Boost clocks are 4.7 GHz and 4.6 GHz.