Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2015 15:53:40 -0700
From:      Dennis Glatting <freebsd@pki2.com>
To:        freebsd-questions@freebsd.org
Subject:   C++ container performance
Message-ID:  <1437778420.67638.120.camel@pki2.com>

next in thread | raw e-mail | index | archive | help

I have a relatively small program (needs to be smaller for post) where
the performance of some STD c++ containers (deque and queue) is more or
less twice as slow under clang than gcc. My question is whether I should
file something under FreeBSD or llvm? Or maybe this is a known,
irrelevant problem?


Summary:
	clang++ 3.4.1	clang++ 3.7.0	g++49		g++5
deque:	0.000890143  	0.000646584	0.000367548	0.000365817


root@Tasha# uname -a
FreeBSD Tasha 10.2-BETA1 FreeBSD 10.2-BETA1 #0 r285434: Sun Jul 12
16:57:18 PDT 2015
root@Tasha:/disk-2/obj/disk-1/src/sys/SMUNI-FreeBSD10-amd64  amd64


root@Tasha# c++ -O3 -std=c++11 -Wsign-compare -Wall -Wno-uninitialized
-fvisibility=hidden -finline -I /usr/local/include main_dc.cc

complex deque: size=88
Done: total_t: 44507162167, sec_t: 44.5072, t/ea: 0.000890143


root@Tasha# clang++-devel -O3 -std=c++11 -Wsign-compare -Wall
-Wno-uninitialized -fvisibility=hidden -finline -I /usr/local/include
main_dc.cc

complex deque: size=88
Done: total_t: 32329207134, sec_t: 32.3292, t/ea: 0.000646584


root@Tasha# g++49 -O3 -std=c++11 -Wsign-compare -Wall -Wno-uninitialized
-fvisibility=hidden -finline -I /usr/local/include main_dc.cc

complex deque: size=120
Done: total_t: 18377396318, sec_t: 18.3774, t/ea: 0.000367548


root@Tasha# g++5 -O3 -std=c++11 -Wsign-compare -Wall -Wno-uninitialized
-fvisibility=hidden -finline -I /usr/local/include main_dc.cc

complex deque: size=120
Done: total_t: 18290835564, sec_t: 18.2908, t/ea: 0.000365817


root@Tasha# g++6  -O3 -std=c++11 -Wsign-compare -Wall -Wno-uninitialized
-fvisibility=hidden -finline -I /usr/local/include main_dc.cc

complex deque: size=120
Done: total_t: 18249643758, sec_t: 18.2496, t/ea: 0.000364993








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1437778420.67638.120.camel>