http://www.e31.net/torque_e.html
That's why, despite their low power, turbo diesels accelerate surprisingly well. Because of the turbocharger they build up torque early and keep it up over a wide rev range. Horsepower, as you can see, are not very descriptive.
But you cannot even rely on the torque figure all the time. Let's get back to the
M3 and Formula-1 example. Both engines have roughly the same torque, the M3 at 5000, the F1 at 16000 rpm. If you put the F1 engine into the M3, the acceleration would be about the same but you could reach higher speeds with the new engine. You could go three times as fast: about 800 kph (500 mph) - theoretically of course, as air resistance would slow you down much much earlier. Okay, that wouldn't be very intelligent, so let's put a different transmission into our car so that at maximum revs it reaches the same speed as with the original M3 engine. But that does mean that the gear ratio is much shorter (about a third) than before and that suddenly three times as much torque will arrive at the wheels and our car accelerates three times faster.
In addition the gearbox has to be specially designed for the engine characteristics. What good is it when you shift into the next higher gear at the limiter and revs drop to regions with not enough torque? So a gearbox that fits the engine characteristics well is very important, too.
Conclusion
In order to know how a car accelerates, you have to have a look at the torque curve, the gearbox and take the weight of the car into account. Then - and only then can you expect a correct result. Knowing the horsepower figure is quite useless in such a case.