This will be not only one web part.
You need a cookie and functionality (to moderate cookie) where you will be stored product ids from comparsion. Then you need a page with repeater where will be listed all of products from the list from cookie. Then I think by javascript you can markup differencies between those products.
Only briefly explained what'd have to do :)