My mother was like that, constantly mentally abusive (in other ways than just criticising school results). Fuck these kind of people. Comparing someone once in a while may be allowed (though honestly it should be in a constructive context, not as a criticism), but they clearly have gone miles too far.
If your child is a (crying) mess after you said stuff like this. Please look yourself in the mirror and look at the monster you have become.
Ugh, these kind of parents are the third worse kind there can be, the second are those that are constantly mentally abusive and the first are those that are physically abusive (mental abusive is given at that stage).