Just recently I was trying to solve a problem but repeatedly encountered TLE verdict. This was while I was using Java 7.
Just thought I'd give it a shot and submitted the ditto same code but in Java 8. Works like a charm.
And it's not some minor difference. There's a running time difference of > 2s, with Java 8 being the faster one.
I'm really curious as to why this happens. Yes, I know some kind of optimization is happening but what kind? A 2s difference is a LOT so it is non-trivial. Somebody explain?