实际测试clang 3.7.1比gcc 4.9.3编译的PostgreSQL性能略好。
测试数据参考下文末尾
gcc安装
llvm, clang安装
CC=/u02/dege.zzz/llvm/bin/clang CFLAGS="-O2 -fstrict-enums" ./configure --prefix=/u02/digoal/soft_bak/pgsql9.5 --with-pgport=1921 --with-perl --with-python --with-tcl --with-openssl --with-pam --with-ldap --with-libxml --with-libxslt --enable-thread-safety
make world -j 32
make install-world -j 32
[参考]
http://www.kitware.com/blog/home/post/1016