Change to gold linker.

Summary:
Benchmark conducted showed positive performance change, a gain of ~20%.

Setup:

ccache disabled (export CCACHE_DISABLE=1)

cd build
rm -rf *
cmake ..
time make -j8

without gold linker

real	3m25,384s
user	11m58,337s
sys	0m37,747s

real    3m48,087s
user    12m57,600s
sys     0m36,837s

real    3m20,116s
user    12m9,570s
sys     0m33,643s

with gold linker

real    2m48,073s
user    10m2,257s
sys     0m27,480s

real    2m55,673s
user    10m13,420s
sys     0m27,233s

real    2m47,866s
user    10m2,377s
sys     0m27,323s

Reviewers: teon.banek, mislav.bradac, florijan, mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D903
This commit is contained in:
Dominik Gleich 2017-10-17 11:24:22 +02:00
parent 14fabe2125
commit 8210d44c47

View File

@ -72,6 +72,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z -Wall")
# Don't omit frame pointer in RelWithDebInfo, for additional callchain debug.
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer")
# Use gold linker to speedup build
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
# -----------------------------------------------------------------------------
# dir variables