There’s a difference between "compare to" and "compare with." Here’s how you differentiate them.
*To "compare to" is to suggest resemblances between things that have different natures:
He compared his looks to Ryan Gosling’s. What an inflated ego he has!
Jame’s mother compared his room to a dump. James must be very untidy.