The M1 has a big.LITTLE design with only half of the cores being performance-oriented, so if there is a gap, it would almost always be in Ryzen's favour.
That’s not how CPUs actually operate though, outside of some very narrow tasks. If you actually regularly max out your CPU, you already know that and wouldn’t touch a Mac mini no matter what chip is in it.