compare
‘compare’
When you compare things, you consider how they are different and how they are similar.
It's interesting to compare the two products.
When compare has this meaning, you can use either with or to after it. For example, you can say ‘It’s interesting to compare this product with the old one' or ‘It’s interesting to compare this product to the old one'.
The study compared Russian children with those in Britain.
I haven't got anything to compare it to.
‘be compared to’
If one thing is compared to or can be compared to another thing, people say they are similar.
As a writer he is compared frequently to Dickens.
A computer virus can be compared to a biological virus.
When you use compare like this, you must use to after it. Don't use ‘with’.