Legion y520 (i5/8gbram/4gb gtx1050ti) vs Lenovo ideapad 510(i7/16gb ram/4gb 940mx nvidia)?

I'm in really a bih confusion on buying a laptop. I happen to like the lap but then wanted more suggestions one these two.
Legion y520 (i5/8gbram/4gb gtx1050ti) vs Lenovo ideapad 510(i7/16gb ram/4gb 940mx nvidia)
The place i happen to buy is selling the ideapad at a lower rate than the i5 of legion.
So wanted to make a decision if its worth spending extra bucks on the Legion y520.

The gtx 1050TI si WAY better than the 940mx. Its no contest at all. If you want to play games, get the Y520, no questions asked.