Блог пользователя NingboNo.1

Автор NingboNo.1, история, 4 месяца назад, По-английски

How fast can the CF C++ executer run?

Or how much data can the CF C++ executer run in one second?

Can $$$3*10^8$$$ AC in one second's limit?

Which runs faster,C++11, C++14, C++17, C++20 or C++23?

Please reply me.

Sorry for my horrible English grammar.

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

»
4 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

i don't know so much about the compilers, but C++23 runs noticeably slower than the others, and i recommend use C++14 — C++17 or C++20 (not so much difference)

»
4 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

The 10^8 estimate is a bit rough, the actual number depends on many factors which can be very tricky to analyze. There are even problems where the intended solution is 10^9 with a good constant.

»
4 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Problems with marginal ops usually set higher time limits

»
4 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can $$$3 \times 10^8$$$ AC in one second's limit?

It depends on the algorithm used. While some extremely fast algorithms (sorting, for example) can handle $$$10^9$$$ easily, a general estimation is about $$$10^8$$$ per second.

Which runs faster,C++11, C++14, C++17, C++20 or C++23?

Normally C++ standard version has little to do with runtime performance.

»
4 месяца назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Depends on your algorithm. If you calculate ALL the constants, based on my personal experience, it is possible to run over $$$10^9$$$.

For example, sometimes an algorithm may appear to be $$$10^8$$$, but with a huge constant, it may still not be able to run.

But sometimes an algorithm looks like $$$10^12$$$ but has a bunch of unpredictable pruning and optimization, and I remember running it once within 4 seconds.

The version doesn't have much impact, but the impact of 32bits or 64bits is much greater than that. The best way is to practice more and research how fast the CF evaluation machine is and whether it performs certain operations particularly fast.

»
4 месяца назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

It has to do with optimization and the tasks. An optimized matrix multiplication code with -O3 -march=native can do about $$$3*10^{10}$$$ operations/second on CF. That same code with default options (-O2) does about $$$10^9$$$ operations/second.