From owner-freebsd-questions@freebsd.org Fri Jul 24 22:53:53 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FB7C9AA5E1 for ; Fri, 24 Jul 2015 22:53:53 +0000 (UTC) (envelope-from freebsd@pki2.com) Received: from btw.pki2.com (btw.pki2.com [IPv6:2001:470:a:6fd::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F31851433 for ; Fri, 24 Jul 2015 22:53:52 +0000 (UTC) (envelope-from freebsd@pki2.com) Received: from localhost (localhost [IPv6:::1]) by btw.pki2.com (8.15.2/8.14.9) with ESMTP id t6OMret6028368 for ; Fri, 24 Jul 2015 15:53:41 -0700 (PDT) (envelope-from freebsd@pki2.com) DMARC-Filter: OpenDMARC Filter v1.3.1 btw.pki2.com t6OMret6028368 Authentication-Results: btw.pki2.com; dmarc=none header.from=pki2.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pki2.com; s=pki2; t=1437778421; bh=85VMQuraA+gsSmtR1VUGMQIM75jF4tQmq8qijH1DwaU=; h=Subject:From:To:Date; z=Subject:=20C++=20container=20performance|From:=20Dennis=20Glattin g=20|To:=20freebsd-questions@freebsd.org|Date:=2 0Fri,=2024=20Jul=202015=2015:53:40=20-0700; b=hXDmBE1k93cAdVECiuWB9psJ9vC3K3sZgh4gnSRKYR/WfqscIP7b7P+BMoAexU7qH JxYTHIlqa/D+38OfDMA11tIMqVe+8hM0BgSp5kzId8U12xmP1G2G438foqx6T6hGqd m+LGWA/5pHT+Mta0OSSSpiEvoVWHxslPiN7Vk4Awnf7T/DCwuxZm04KkkmYEij7sLc TXxHnSfJ+WiFE0WnMV2+QEKCfYzyy9vFzCFvo9EUqK+85qY+Xj5Uex20aPuB1LB0wH OLgR5OJaXCMwsKrgI9CajaK+sUwoZNd5h1h47ePhs6uY2D1LpN90HyProMwvWXvVQd CoiAsccbleSOA== Message-ID: <1437778420.67638.120.camel@pki2.com> Subject: C++ container performance From: Dennis Glatting To: freebsd-questions@freebsd.org Date: Fri, 24 Jul 2015 15:53:40 -0700 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SoftwareMunitions-MailScanner-Information: Dennis Glatting X-SoftwareMunitions-MailScanner-ID: t6OMret6028368 X-SoftwareMunitions-MailScanner: Found to be clean X-MailScanner-From: freebsd@pki2.com X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2015 22:53:53 -0000 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