I think stock for stock the M5 wins but mod for mod, those twin turbo cars scream ahead in hp/$. Just a tune on those cars and they are going to usually be faster. Depending on altitude a little bit, but regardless - those are powerful little engines.
I dread to think on these 335i and 335d...
Brothers 330d 204bhp was remapped to be savage as possible, approx 250bhp, and on motorway back I had to be on the ball to compete!
By the time you've had time to think and react, that lump of torque has taken them into the distance.
Been here, done this. My previous car was a 2007 335i coupe with just the ProCede V3 tune (comparable to the JB3) and dual cone intake. That car ran 12.33 @ 116 on street tires with a mediocre 1.96 60'. Try that in a stock M5. In a heads up race, it destroyed my then stock Beast by 4-5 cars on a 60-110 highway pull. Throw some downpipes and FMIC on the 335 and it's adding insult to injury.
i have a friend with dinnan stage 2 and i have a e39 m5 with s2 ( intake,chip and muffler ) . run from 40 to 120 2nd gear. the result is 335 lead almost 1 car ahead . i think because of the torque. but when it reach 100 the e39 m5 already catch up with the 335 due the less torque that i have .