Are these workloads comparable? It could very well be that macOS is doing more compilation. If you wanted a fair comparison, you could run Linux on both and compile in that.
Even if building for macOS requires more overall work, I wouldn't say this constitutes a "real-life" comparison because the output product is different.
Here are real-life / practical numbers so you will know what to expect.
Compiling Sciter (https://sciter.com) full rebuild (C++):
i7/32GB - just 64 seconds.
That ARM (WDK)/32GB machine - 2 minutes 6 seconds.
And for the comparison, same Sciter sources, full rebuild
Mac (Mini) M1 machine - 8 minutes 33 seconds (XCode/LLVM, but it builds universal binaries).
And yet, the same Sciter, Linux on MacMini/Intel, GCC
i7/32GB - 9 minutes 45 seconds.
So, when we speak about hardware it is not enough to compare pure synthetic benchmarks but real life scenarios.
Really, Microsoft Windows is the most developer friendly platform. De facto.