WorldBias's blog

By WorldBias, history, 3 years ago, In English

Hey CF!

Today I submitted the exact same code in C++ 20 and C++ 17. In C++ 17 it passed but TLE in C++20.

132652146 C++ 20 (TLE).

132652139 C++ 17 (ACCEPTED).

Does it mean that C++ 17 is faster than C++ 20?

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

»
3 years ago, # |
Rev. 2   Vote: I like it -7 Vote: I do not like it

I think it has more to do with being 64 bits than anything. Submitting with 64bits in c++17 gives 998ms: https://mirror.codeforces.com/contest/420/submission/132652146.

Also, c++20 is faster sometimes and slower in other times, its not universally better or worse.