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...