simple g++ vs clang++ benchmark with reaction-diffusion

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ม.ค. 2018
  • This is a "benchmark" (rather: basic test) of pitting the two major compilers form the OpenSource-world against each other in a 2D reaction-diffusion simulation. It's g++ 7.2.0 vs clang++ 5.0.1.
    The compile-flags used are:
    -std=c++14 -Werror -Wall -pedantic -fno-omit-frame-pointer -Ofast -march=native
    The CPU in the test-machine is a 4-thread (2-core) i7-6500U@2.5 GHz, which can boost upto 3.1 GHz.
    The frame-rates achieved under screen-recording are:
    361fps (g++) vs 398fps (clang++), thus clang-generated binary is 10% faster.
    Without the screen-recording:
    447fps (g++) vs 524fps (clang++), making the clang-generated binary being 17 % faster in this case. It's also a bit smaller.
    If you want to play around with the code yourself, grab it with:
    git clone github.com/MacSlow/reaction-d...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 2

  • @Madi-qq9vn
    @Madi-qq9vn 2 ปีที่แล้ว +4

    so clang is a little bit faster? okay. Thanks

    • @user-ke8ys6eq4y
      @user-ke8ys6eq4y วันที่ผ่านมา +1

      No you commented 2 year ago and in that time gcc got alot much faster then clang latest version clang 18
      After clang 16 clang got alot much slower so much slower that it took 8 min to execute code where as gcc took only five second
      There were like 110 million iteration in that code