The drill on the M5 diff is you need either the M5 axles OR get different flanges for the 540 axles. I think there's an E34 or 7er flange or something you can use. I'd have to look it up... I've thought about it...
Few more comments:
- there's a buncha places that can regear your diff or any core you have to whatever you want including gearing AND LSD components including diffsonline
- myself, i'd really not bother screwing around w/ the diff without going to LSD at the same time unless yer on a super tight budget. tossing an E46 or M5 LSD in adds to the ROI for sure.
Lastly, as any racer will tell you, there's no "right" empirically "better" gearing and despite street urban legend to the contrary, higher geared diffs don't "put more power down", they just put it down at different wheel speeds. yeah the car might "put more power down" in first coupla gears and that might be great for your driving style and on the street most people will feel it as "more power" at the stop light drags. But for a tracked car where 1st gear doesn't even come into play, a lower diff might very well shift the 3rd/4th gear peaks into a much worse spot (and I'm not talking about top speed, talking about where the gearing is optimized for your track). Lots of E46M3 n00bs go running after low geared diffs (4.11's) so they can win more stoplight races... If that's all you do that's great, but some find later that tracking the car the rest of the gears aren't really where you want them to be... On other hand a lot of track setup cars are dog slow in 1st because everything is optimized for 3rd and up on the track...
Don't take that as an argument against OP doing the diff swap BTW - I LIKE the 3.15 in my Touring, just take it as an argument against not arguing for one or the other - whatever floats someone's boat as long as it works.