I've heard it said many times that boys perform better when they are in the same classroom as girls and girls perform better when they are by themselves.
Is there any evidence to support this claim?
It is partially true. Girls perform better in all girls schools according to Daily Telegraph.
Analysis of Key Stage 2 and GCSE scores of more than 700,000 girls has revealed that those in all-female comprehensives make better progress than those who attend mixed secondaries.
But boys don't perform better in co-ed classes with girls. They perform better in all boys classes.
The researchers found that at age 16, girls in girls’ schools were more likely to gain maths and science A-levels, and boys in boys’ schools more liable to gain A-levels in English and modern languages than their peers in co-educational schools. Girls and boys in single-sex schools also had more confidence in their ability to do well in these subjects
It probably makes no difference.
Gender-segregated schools still exist in the United Kingdom, United States, Australia, Trinidad and Tobago, Korea, and some other countries. Therefore, it is possible to study whether either works better in reality. A comprehensive meta-analysis published in 2014 analysed 184 studies, and concluded that it is unlikely that single-sex education offers any advantages or disadvantages for either gender. The study covered primary and secondary education.
“The Effects of Single-Sex Compared With Coeducational Schooling on Students’ Performance and Attitudes: A Meta-Analysis,” Erin Pahlke, PhD, Whitman College; Janet Shibley Hyde, PhD, and Carlie M. Allison, MS, University of Wisconsin-Madison; Psychological Bulletin, online Feb. 3, 2014. In: Psychological Bulletin, doi:10.1037/a0035740. Available online. See also press release by the American Psychological Association, from which I quote (emphasis mine):
WASHINGTON — Single-sex education does not educate girls and boys any better than coed schools, according to research published by the American Psychological Association analyzing 184 studies of more than 1.6 million students from around the world. The findings are published online Feb. 3 in the APA journal Psychological Bulletin®.
The analysis, funded by the National Science Foundation, included studies of K-12 schools published from 1968 to 2013. Among the studies, 57 used stronger research methods, such as studies in Trinidad and Tobago and Korea that randomly assigned thousands of students to single-sex or coed schools and tracked their outcomes. Other examples of more rigorous studies controlled for pre-existing differences between students, such as testing students before and after they enrolled in either a single-sex or coed institution. The total sample included 1,663,662 participants in 21 countries. The studies examined students’ performance and attitudes in math and science; verbal skills; and attitudes about school, gender stereotyping, aggression, victimization and body image. They did not find sufficient evidence to show any difference in these attitudes between boys and girls in single-sex or coed classrooms.
NB: That does not mean there certainly is no difference, but with a study of this scale, I think it is fair to conclude there probably is no (major) difference.