I believe it was only the shortage of the Packard built R/R Merilin engines that kept it from being "upengined" with that lovely engine. Surprised no one picked up on this; there were Merlin-engined P-40s, F and L models. As you might expect they had better high-altitude performance, although I don't think they were the absolute fastest P-40s. Apparently they were used extensively by the USAAF in the MTO, also be British/Empire forces. I recall reading the OOBs in Carlo d'Este's Anzio book and being surprised how many squadrons were still using P-40s at that point, early 1944.
Well that was from the Joe Bauger page, or my own supposition from it I should say. I figured that since there were only 2,011 of the two models produced, out of the 14,000 + P-40s, it might have been the shortage of the engines as much as anything. Just my sort of "take" on why more of them weren't produced with that engine. See: Factsheets : Curtiss P-40 for production numbers of the F and L series.