Correct answer, it comes down to IPC, instructions per clock. If a processor running at 4Ghz has an IPC of 10, vs another with a IPC of 15, then the latter would be 50% faster, there will be losses etc. but that's the basics, IPC is an outcome of the design, the capability of the scheduler etc.
As to whether you should get the one clocked higher at stock, think about the old FX series they were clocked quite high, but were useless. So clock speed by itself is irrelevant, Ryzen doesn't OC that well, a 3.5Ghz stock might get you to 4.0/4.1 OC'd intel seems to have more headroom.
So it all comes down to stock clock x IPC and the likely OC x IPC. We don't know the IPC, hence we rely on benchmarks which are closer to reality than the pure...