The most often cited paper w.r.t. gender diversity (the kind most at issue here) seems to be this one:
https://papers.tinbergen.nl/11074.pdf
A more readable summary is here:
http://gap.hks.harvard.edu/impact-gender-diversity-performan...
The authors did indeed find a balance point, at about 50:50 (a far cry from the 81:19 among engineers at Google). OTOH, this was for a very different kind of task than programming. Another starting point is here:
http://www.chabris.com/Woolley2010a.pdf
It's particularly interesting that many summaries of this work will use vague terms like "composition of the group" to avoid mentioning anything in the findings about number of women in the group.