As far as ground attack the P-38 with four .50 cals and a 20mm cannon, was imho a better platform. Mainly because all the guns were centrally placed so convergence of fire wasn't as important.
As much as I love the "Fork-Tailed Devil," this just isn't true.
A single bullet in the right place could take out a liquid-cooled engine (Allison V-1710). And losing an engine (even in a twin-engined fighter) at low altitude was disastrous.
Also, despite the concentrated fire of the P-38, the P-47 was the more stable gun platform at low altitude.