xsc's blog

By xsc, history, 6 years ago, In Russian

Hi, everyone.

Why same source code is slower on GCC-5.1 C compiler and very fast on GCC-5.1 C++.

See 38119970 for GCC C runs 468 ms.

And 38119937 for GCC C++ runs 78 ms.

Are there different optimization compiler flags ?

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

»
6 years ago, # |
  Vote: I like it +5 Vote: I do not like it
  • »
    »
    6 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    I bet it's because solution may share resources in case it doesn't have TL. You can try to Google exact details.

»
6 years ago, # |
Rev. 3   Vote: I like it +10 Vote: I do not like it

Did you try GNU C11 mode? I always get slow time.

![ ]()`

  • »
    »
    6 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No, I can't explain that, it seems that test #12 always takes a lot.