My 2500k struggled to hit above 4.2ghz and my 7700k does 5ghz so an 800mhz difference probably helps as well as RAM that's literally twice as fast
When you upgraded to 7700k did you upgrade your Gpu too? I often find people mention night and day differences but forget the other things that coincided with their upgrade. Nice fresh installation of windows etc gives a much greater impression.
I'm not saying it's not faster mind. I went from 2500k at 4.5ghz to 5820k at 4.5ghz and it's definitely faster but for my day to day usage not night and day.