which one is better?

The i7-4700MQ (4 cores - 8 threads) is a significantly better processor than the i7-5500U (two cores - 4 threads) while the two GPU's are about equals. IMO, it makes the i7-4700MQ machine more desirable