Comparing the abilities of one against the other is completely moot. They are designed to do completely different tasks. Where the M3 excels the M5 fails and vice versa.

As to which one I prefer, I would have to choose the M5 simply because the exhaust note of the E46 reminds me of something farting thorugh a tin box.