I have had my 97 540i for sometime now(6yrs).
I bought a '00 M5 only to get a few tickets which forced me to sell it.
During that time I had a big grin on my face.
In all out power its a stronger car. In the handling dept you can change the old suspension on the 540 and have it work better then stock M5.
The 540 is 200lbs lighter for some reason.
Better brakes can be had by talking with Dave Zeckhausen.
never underestimate the little brother