I think Ed's point is essentially correct, the 5"/38 was effective against aircraft when using VT fuses with multiple barrels that were radar-guided with the firing solution being generated by an electro-mechanical calculator (in 1944/45 it was probably considered a computer, but that's a stretch by modern standards). Even so, DD's on radar picket duty were often in grave danger of being overwhelmed by more targets than they could engage.
The 5"/38 was a formidable weapon, but 15-20 RPM per barrel just wasn't enough to handle a wave of Kamikaze attackers. On the other hand, the 20mm mounts had a high rate of fire but were also considered ineffective with the 40mm mounts being a good compromise between the two. By 1945 the USN had begun to deploy the open twin 3"/50 mount that had a higher rate of fire than the 5"/38 and more hitting power than the 40mm quads and twins.
You have to wonder how any aircraft were shot down in the early years of the war. The old BB's at Pearl Harbor typically had four 5"/25 mounts in each broadside battery that were guided by a director that (if I recall directly) could not track engage targets with speeds in excess of 200MPH. The shell fuses were set mechanically at the mount based on information from the director, loaded and fired.
Mike