If the child in question is a good kid, and someone to emulate then sure I think it's fine to compare. Hopefully your child will see how the other child is behaving and want to emulate the same behavior. This is how young siblings learn to a degree naturally be following their older siblings around and comparing themselves to each other and emulating them.
Comparing our childrren with others can make them lose self-
confidence and not believe themselves. Moreover, it can not stimulate children change or develop but just make them feel bad. They may feel that they just receive the love and appreciation's parents once they are better than others. Let's accept your children with all strenth and weakness. The story of Thomas Edison's mother give us many valuable life lessons about this topic! Let's search and read!
I think no because your child is unique and should only behave in one certain way because of a specific reason. I think that kids are in one way or the other. If it is that they behave badly they should be treated not bad but worse than if they behave good.
Would you have appreciated it if YOUR parents compared you to say, one of your siblings, or one of their friends’ kids? I didn’t think so!!!!! Rule of thumb: If you wouldn’t like it if it happened to you, don’t do it to others!! ESPECIALLY YOUR CHILDREN!!!!!!!!!! Why would someone even ask this?!?!!?!?!?!