Gaming speed, cores and clocks
On our gaming index the Ryzen 3 4100 scores 35.7 and the Ryzen 3 3100 scores 34, about 5% faster for gaming. That gap is small and mostly shows up at 1080p with a very fast graphics card.
The Ryzen 3 4100 has 4 cores and 8 threads, and the Ryzen 3 3100 has 4 cores and 8 threads. Core counts are the same, so cache size and clock speed decide the difference. Boost clocks are 3.9 GHz and 3.9 GHz.