Well 5th gen is mostly a die shrink with better power efficiency mostly and a better graphics on the chip as for the performance it shouldn't be much different so it will depend on the exact models you are comparing
and since performance won't be affected I will go with 4th gen i7 as a better performer hands down without even knowing the models
5th gen is still in U grade even though they have higher core clock, so i would suggest 4th gen i7 with M, MQ, MX, HQ suffixes. But you just can't judge a laptop by its configuration. Btw which model are you comparing exactly?
Well 5th gen is mostly a die shrink with better power efficiency mostly and a better graphics on the chip as for the performance it shouldn't be much different so it will depend on the exact models you are comparing
and since performance won't be affected I will go with 4th gen i7 as a better performer hands down without even knowing the models