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

Автор actualtsg, история, 5 месяцев назад, По-английски

GCC 5.1 is too old and slow for today standard! I have encountered so many problem because of it

"qsort" implementation is slow:

"%lf" on printf is not working (scanf is worked), should be "%f" but that for float not double:

    • code 500D: (364906153 WA) (364906215 AC after 10 retries figuring out that the problem was %lf!)
    • comment: you can see on my WA submission that I just printing 2.0 but output always 0.0 for unknown reason :(

sscanf / sprintf is slow:

"%hhu" is not working (can't scan / print unsigned char number from stdin / to stdout directly):

    • comment: compiler is too old for the %hhu feature :(

Calling printf frequently is slow in C but fast on C++:


Conclusion: The old compiler has a lot of problem! Imagine using unoptimized gcc 5 on 2026 >,< Now there is gcc 15 which is 10 versions above. Why not upgrade the compiler? @MikeMirzayanov

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

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

What stops you from writing C code in C++?

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

Man, using C is kind of Flex at this stage I'd say!

You have my respect.