It seems that it matters that you enroll your kids to a class of his peers, and when I say his peers, I mean of your kid's own age. In his latest Policy Research Working Paper, Liang Choon Wang of the World Bank finds that there's a negative effect of having a class of different ages to that class' academic achievement.
After analyzing exogenous variation in the classroom variance of student age in 14 developing countries to examine its effects on student achievement, Wang finds that:
"[G]reater classroom age variance leads to lower fourth graders’ achievement in mathematics and science. For every one month increase in the classroom standard deviation of student age, average achievement falls by 0.03 standard deviations for both math and science."
It should also be noted that such detrimental effects only affect academic performance; there's no significant negative effects on the behaviors of the students. Expectedly, Wang recommends a strategy of age grouping rather than age mixing in schools in order to achieve higher average academic achievement.
It would be interesting to analyze further the distribution of grades among those students affected since Wang's results are only based on the average grade. Some students may have benefited from the age sorting scheme. In particular, it might not be surprising to find a skewness in the distribution, specially if we find that the older ones are the ones getting higher grades.