Yes the P-40 had a couple variants fitted with the Merlin engine. The F and L were both equipped with the Merlin instead of the Allison engine. And the F actually came along in summer 1942, before the P-51 was equipped with the Merlin. But the performance increase was not so drastic on the P-40 as it was on the P-51 with the new powerplant. Which mainly goes back to the airframe itself, a mid 1930’s design, the P-36, adapted to fit an in line engine.