A quad core i7 is faster than a dual core i5, not only because it has twice as many cores to process instructions but also has a higher turbo speed.
As previously mentioned, if you are comparing an i7 U variant, it only has 2 cores and runs about as fast as an i5.