Generative AI can make relatively simple software development tasks 20% to 50% faster, a McKinsey survey found, but it also introduces risks.