Блог пользователя codexile

Автор codexile, 11 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +28
  • Проголосовать: не нравится