Earlier quoted context omitted.
Getting beaten up by the differently-gifted jocks is beneficial?
Posting snarky replies on HN is beneficial?
But I'll make it explicit, if irony is considered too snarky: Exposing more gifted children to less gifted ones might be beneficial in small doses, it isn't in general. One group will always be detrimental to the other:
Because the more gifted children get bored, learn to minimax everything and to procrastinate because nothing really requires their full application and attention. Maybe you give them harder tasks, but seeing that in the presence of the less gifted children they can also get by with less work if they just play dumb, they will learn to adapt and play dumb. Tons of psychological problems like procrastination and impostor syndrome (that HN likes to complain about) are caused and worsened by these mechanisms.
If you do the converse and do your teaching on a level appropriate for the more gifted children, the less gifted ones will be in over their heads. They won't learn most of the curriculum, but they will learn their inferiority and helplessness. They will also learn to hate the more gifted children, and seek an outlet through violent means if possible. I suppose a good part of the HN population has been on the receiving end of that one.
If you need examples where coeducation is never done, look no further than the school's choir, orchestra or sports teams. If you aren't in the top group of abilities for those activities you are either not selected, or selected for the second team. With good reason.