That is probably peak G. You would have to look at average Gs pulled on the track. I'm sure M is ahead. One apex hit perfectly vs slightly off apex would do this to numbers.
You can see that on longer track torque advantages disappear, but on shorter track extra torque helps get on power earlier. Even though if you are are in the right gear in M3 and well past 5k you still have lose time to downshift to get into that powerband. N54 has it immediately available without downshifting.
All in all, M3 wins in acceleration, braking and longer track time. Narrower tires on alpina actually help in slalom times. More maneuverable.
2000 M5, 161k, Ronin edition
2011 Cannondale Caad 9-5, 52mph top speed