I have both, and use both everyday.
I use an M1 MacBook Pro (16Gb Ram) for personal projects and as my standard home/travel computer. It is amazing and fast.
I use a Lenovo Carbon X1 Laptop with similar specs (i5, 16Gb Ram, m.2 ssd) for work that runs RHEL 8 (Red Hat Enterprise Linux). It's insanely fast and stable.
The overhead to run RHEL is so small it would blow your mind at the performance you get from almost nothing. Mac or Windows are crazy bloated by comparison. I know I am sparking an eternal debate by saying this, but I personally have never found Ubuntu to be as stable for a workstation (but ubuntu server is great) as RHEL is.
With that being said, I still think the M1 mac is the best computer I have ever owned. While linux is great for work, I personally enjoy the polished and more joyful experience of Mac for personal use. There are a million quality of life improvements that Mac offers that you won't get in Linux. The app ecosystem on mac is incredible.
When most people make comparisons for the M1 Mac, they are comparing windows PCs (generally Intel-based ones since Mac previously used Intel) and they compare intel-based Macs. I have never seen someone comparing it to linux performance.
The speed of the M1 mac is far better than Windows and far better than old Macs. There is no question. Before my M1 mac I used a MacBook Pro with an i7, 16Gb RAM, and the upgraded dedicated graphics card. The little M1 MacBook outshines it at least 2 to 1. Best of all, the fans never turned on, and my old MacBook Pro had constant fan whine which drove me crazy.
The other incredible feat of the M1 Mac is the battery life. I run my laptop nearly exclusively on battery power now. I treat it like an iPad. You plug it in when it gets low, but I can use it for about a week between charges (I use it for 2-3 hours each day). I don't turn the screen down or modify my performance. I keep the screen fairly bright and just cruise away. I love it.
While Linux might be able to outshine on performance, it doesn't outperform with battery. My Lenovo laptop is worth about 2x my MacBook Pro. It is a premium laptop and yet running RHEL I will be lucky to get 6 hours. Compare that to ~20 hours of my MacBook.