I’m comparing Windows PC (i7-6700k, nvme) with MBA m1 and MBA is noticeable faster in just everything. Compilation time of JS and Java code is literally 2 times faster on MBA M1 than on desktop i7 CPU.
I was comparing 2 computers I have (read the comment I replied to). But if you are saying that passively cooled Apple notebook should be compared to last-gen Intel desktop CPU with powerful cooler - Apple enginers would be honored to read it ;)
While the M1 is surely impressive I think you put too much weight on those JS compilation results. Windows is known to be really slow for this specific task since it has poor per-file IO performance - especially when Windows Defender is enabled.
I do my daily work - involving lots of JS compilation - on a i5-4690 running ubuntu server, it's faster than any of my colleagues' much newer MacBook Pros (no M1's yet though). Our Windows laptops are so far behind that it's just awful to watch (3-5 times slower).