Re: PostgreSQLv14 TPC-H performance GCC vs Clang - Mailing list pgsql-performance

From Imre Samu
Subject Re: PostgreSQLv14 TPC-H performance GCC vs Clang
Date
Msg-id CAJnEWwmj+sC32bnUYr6-sTBuQ39dbwzRcWTmA2fhiB9u8kDGeA@mail.gmail.com
Whole thread Raw
In response to PostgreSQLv14 TPC-H performance GCC vs Clang  (arjun shetty <arjunshetty955@gmail.com>)
Responses Re: PostgreSQLv14 TPC-H performance GCC vs Clang  (arjun shetty <arjunshetty955@gmail.com>)
List pgsql-performance
> .. optimisation flags like O3
> And please suggest ...  to check on the performance difference 

The Phoronix has been tested the PostgreSQL 13 with Clang 12 + GCC 11.1 On Xeon Ice Lake
  "The CFLAGS/CXXFLAGS set throughout testing were "-O3 -march=native -flto" 
  as would be common for HPC systems when building performance sensitive code."
and the results:
only the Postgres ( GCC 11 vs. LLVM Clang 12 Benchmarks On Xeon Ice Lake ) 
  maybe you can replicate the Phoronix results  ( but this is only gcc11.1 ! )
  "Compare your own system(s) to this result file with the Phoronix Test Suite 
    by running the command: phoronix-test-suite benchmark 2105299-IB-COMPILERT91"

Regards.
  Imre

arjun shetty <arjunshetty955@gmail.com> ezt írta (időpont: 2021. nov. 2., K, 18:13):
Hi 
PostgreSQLv14 source code build  with GCCv11.2 and Clangv12(without JIT) with  optimisation flags like O3 and tested with HammerDB
Observed TPC-H , GCC performance better than Clang(without JIT). The performance difference ~22% and also noticed the assembly code difference GCC vs Clang( e.g. GCC inlined functionality compared to Clang). 

Environment details:
————————-
OS :RHEL8.4
Bare metal : Apple/AMD EPYC/IBM
Test(TPC-H) Benchmark Environment:HammerDB

Is the performance difference mainly because of below points ?
1 data over flow and calculations like int128(int128.c) and C arithmetic operations(functions include in float.h e.g float4_mul)   

And please suggest is any another functionality or code points need to check on the performance difference 

pgsql-performance by date:

Previous
From: arjun shetty
Date:
Subject: PostgreSQLv14 TPC-H performance GCC vs Clang
Next
From: ANASTACIO Tiago
Date:
Subject: JIT llvm11 package