codexile's blog

By codexile, 10 years ago, In English

Please consider the following 3 submissions:

The same code has been executed with Java 6->7->8 compilers. Outcome is:

  • 702 ms (Java 6);
  • 1000 ms TLE (Java 7);
  • 998 ms (Java 8).

I assume that the issue is in 32-bit and 64-bit based compilers. I guess that CodeForces uses 32-bit one for the Java 6 only.

So I've been more than surprised (it's not like 850ms vs 900ms — it's 30% faster!). I'd like to get some explanations from the community on this matter. I can also see that many people here use Java 7 or higher. So what's the reason behind this (having the problem from above?)

Maybe this solution was just specific (e.g. memory usage and stuff) or kinda buggy? Or we can see such performance degradation on every submission?

Anyway, let it be at least a friendly reminder for all Java-users to think twice, before pressing the "Sumbit" button.

Full text and comments »

  • Vote: I like it
  • +28
  • Vote: I do not like it