As with all these state / private discussions, there isn't a clear boundary between thw two types of school. Some comprehensives in leafy areas will have cohorts of similar or better calibre than some non-selective independents.
The question has to be about progress - how many children at each level of ability at the beginning of secondary make it to As and A*s for GCSEs [I know this is anyway a gross generalisation because e.g. levels for art, history etc aren't available for the end of primary, beginning of secondary).
So for example if a child comes in at level 3 for Maths at the beginning of Year 7, and gets a C, that represents 4 levels of progress - extremely good for a child who clearly struggled at primary.
If a child comes in at a level 5, then the same 4 levels of progress would take them up to an A - and as to reach a 5 they would have made very good progress in primary, 4 levels in secondary is unlikely to be such an ask.
So if school A takes in children with level 4s at the end of Year 6, and gets them to As or A*s, then they have done fantastically well as the children have made well over expected progress.
If school B takes in children with level 5s at the end of Year 6 and they get As and A*s, that, though very good progress, is not as exceptional.
To see what schools are really doing with the children in their care, you really do have to dig down to 'progress by individual child'.