The M3 and AMG C-Class almost never used similar powertrains except in very rare situations when Mercedes released the C36 and the C32, and even the dynamics of those cars are nowhere as good as the popular M3 of the E36 and E46 generations. The only seriously track-focused C/CLK-Class machines ever built were those of the DTM and Black Series variety, but those compete with the CSL and GTS versions of the M3.
The M3 has always used inline-sixes except in the very rare case where the E9x used a V8 (albeit a medium-sized one like the first C43, rather than the more traditionally-sized American-style ones like in the the C[LK]55 and the first C[LK]63).
The C-Class AMG has typically used V8s, but moving forward it won't even have a six-cylinder engine. With a hybrid four-pot motor it will be - for the first time - slower in both aspects than the M3. Generally, it has always been faster on a dragstrip and equal (or slightly slower) on a track.
I said this once before, but AMG's history of performance cars is quite frankly different than that of M's or even Alpina's.
Mercedes equivalents (especially pre-2007) for the most part were the same mid-range cars with top engines and hardly any improvement to interior and exterior details.
BMW equivalents for the most part are MUCH better versions of mid-range cars with vast improvements to wheel allignment, significantly preppier tires, slightly larger brakes, the addition of boy-racy steering wheels, and sometimes a widebody kit.
Post-2007 Mercedes-AMGs are more similar to BMW M models. Pre-2007 Mercedes-AMGs are more similar to a big-block muscle car.
BMW M is the consistently modern equivalent to a track-day pony car of the 1960s and '70s with moderately powerful V8s - https://en.wikipedia.org/wiki/Trans-Am_production_cars