Our karate dojo classes students:
partly by age (especially with really young kids, and sometimes the adults don't want to be in a class with middle schoolers, but sometimes we do)
but mainly by rank,
and within rank by ability (because even at the Black belt level some excel and some don't, so the talented are invited to join the competition team or invited to help teach classes )
and within abilities,by height for certain activities, so that someone 3'8" tall actually has a chance of delivering a blow to the stomach of an opponent, and so someone 5'10" can punch straight out and actually make contact.

While there is an awareness of who the really talented students are, there is no angst about being "ahead" or "behind", just "what is your goal" and "what are you working on" . It would be nice if school were managed this way.