The RS5 was brought in by Audi as a direct competitor to the M3 (E90/92 etc) as the market for a fast small Audi saloon in Europe is not there, and the fact that the B7 RS4 was a bit of a dog with it's carbon issues. Hence there is no RS4 saloon now.
In B7 guise, the RS4 was almost identical to the E90/92 M3 figures wise, the only difference being the torque figure, 400 on the M3, 440 on the RS4 (KW rated the same at 309). It needed the additional torque to pull the heavy Quattro system around. 0-100 times were also almost identical (theoretically). However, interestingly, the RS4 was lighter than the E90.
Audi have in their range the RS4 Avant, RS5 (not in Sport Back) coupe and vert, the RS6 Avant (4L twin turbo V8 and no saloon. We don't get this because Audi don't see enough of a market for super Avants locally) and the RS7. RS7 (409Kw) to compete with the M6 GC (412kw) (as there is no coupe version), the RS6 to compete with a non-existent M5 tourer, the RS5 to compete (realistically) with the M4, and ostensibly the S4 to compete with the M3. The S4 is a sleeper of note. Stock vs stock, the M3 will hand the S4 a hiding. The S4 is deemed to be the flagship B8. The RS4 almost falls into a void. That being said, Audi slipped with both the RS4 and the RS5. They both should've been twinscroll (at the least) turbo 4L V8's. So a derivative of the twin turbo V8 in the RS6 Avant and the RS7.
This RS4 was NEVER going to come close to that M3, the power to weight ratio is just completely off the spectrum power wise, the M3 has newer technological engine specifications (the 4.2 V8 in the Audi has been around since the early 2000's in the C5 twin turbo RS6, 331Kw and 580Nm, and is known to be heavily retarded by carbon build up issues, which can set in as early as 10,000km's on the clock. So all in, there was never a chance of that Audi winning.
The B7 RS4 wasn't even a match for an E46 M3, let alone an E90/92. A strong B7 RS4 on a dyno in JHB is doing just under 200WKW, that alone should show you. Which means, logically, that the current one, rated at 332Kw, will be in the region of about 220WKW (guessing at reef adjustments). So factoring in the fact that the M3/M4 will lose just about nothing, even at coastal adjustments, the actual power curve on the BMW will be significantly better, less loss through the drive train, less weight to carry around etc. Quattro adds an additional 300kg's to the weight of an Audi. So realistically, off the bat, the M3 will be pulling a lot more power, probably over the 50Kw mark more.