And then you get 'smart' Year 8s going into a class with average Year 9s and 'dumb' year 10s... Who proceed to make the class hell for the 9s and 8s.
^^^
THIS.
When I was in 8th grade, they decided I wasn't challenged enough so they shipped me over to the high school next door one period a day to take Biology (typically a 9th grade subject). While the material was more challenging, it also made me stick out that much more like a sore thumb socially. You had high schoolers who were that much more miffed that a kid
not even in high school was doing better at this than they were. And you had middle schoolers who wondered what the fuck I did to get to go to high school a year early (I wondered that myself...wasn't like I tested into a program or anything). The fact that it was just me, and no one else from my class of like 500 8th graders,(several of whom were just as bright or brighter) created resentment from that end. So while I learned more, it made my peer interaction that much more miserable.
Ultimately, I hate to say it, but the most workable solution might be something along the lines of what we have now -- a public system that tries to teach a "floor" of at least basic common knowledge needed to function in society, and the brighter kids can be served by private schools/homeschooling/private instructors. Granted, that means that only the RICH bright kids get fully served by this system.
I guess the question is, are you trying to improve the system in terms of median outcomes, overall maximal outcomes, outcomes per cost, or reducing inequality? Because you're not getting all four. Hell, I'm not sure you can get any TWO at the same time.