I saw 64GB vs 32GB here, many apps are memory intensive, thus the linux desktop will win no matter how faster M2 is, it will be interesting to run cpu intensive benchmark between them and see how that goes.
for ML training or 3D graphics, I wonder how M1 and M2's NPU and GPU are supported under Linux, unless they're optimized and verified to be superior, I will grab a machine with RTX 3090Ti instead.