Use compare to when the intention is only to indicate the likeness between two things; use compare with when the intention is to note the differences and similarities between things. Thus I compared her actions with those of a professional indicates a comparison in both similarities and differences, and The author compared her eyes to a pool of mercury indicates only a likeness between the eyes and a pool of mercury.