The P-40F did not get the same Merlin as the P-51 used. Early Merlins (Spits 1-5, Hurris, Lancs, early Mossies etc) had a single stage supercharger, like the Allison. This gave good performance at low/med alts.
Later Merlins (Spit 8, 9, 16, P-51B,C,D, later Mossies etc.) had a two stage supercharger, at higher alts the second supercharger kicked in giving greatly improved performance.
If the Mustang had been given the same early Merlin as the P-40F it would not have improved it much at all. Curtiss (and Lockheed) wanted the later Merlins but they never got them.