My experience with the M1 MacMini vs my 2015 MacBook Pro Quad I7 was concerning. Building an identical project on both (an IOS, Objective-C iPad app) was FASTER on the 2015 MacBook Pro vs M1 Mac mini.
2015 MacBook Pro i7 - 11.9 seconds
2020 M1 MacMini - 16.5 seconds ...???
I had 32 GB of space left on the 16GB M1 MacMini with 256GB Hard Drive
and about 660GB on my 16GB MacBook Pro (2015 laptop)
My solution/fix ....though I don't understand why this was an issue ...I had 'only' 32 GB of clear space on the M1 SSD hard drive.
But the project is only about 420 MB of files, assets, etc.
I suspected it may have something to do with the disk caching ( the major hangup on the M1 MacMini build was an extremely long time to build the asset catalogue data. After running a disk cleanup utility on the M1 MacMini and cleared up a good 3 GB more space, the build time went from 16 seconds to around 3.7 seconds. Where it was taking just under 12 seconds on the 2015 MacBook Pro.
I used Disk Doctor (from the App Store).. on a whim, and it resulted in a big performance boost...still not sure why.