From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32226 invoked by alias); 10 Feb 2009 22:08:30 -0000 Received: (qmail 32216 invoked by uid 22791); 10 Feb 2009 22:08:29 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from mail-ew0-f10.google.com (HELO mail-ew0-f10.google.com) (209.85.219.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Feb 2009 22:08:21 +0000 Received: by ewy3 with SMTP id 3so30233ewy.8 for ; Tue, 10 Feb 2009 14:08:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.210.13.17 with SMTP id 17mr5126898ebm.130.1234303698081; Tue, 10 Feb 2009 14:08:18 -0800 (PST) Date: Tue, 10 Feb 2009 22:08:00 -0000 Message-ID: Subject: exception performance in modern gcc From: Brendan Miller To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg00067.txt.bz2 Various places online indicate that throwing exceptions has fairly poor perforamnce on older versions of G++; however, I'm having a hard time finding benchmarks for modern 4.x G++. Does anyone have experience with this? Are there any good benchmarks on modern GCC? I understand that exceptions aren't meant to be thrown often, so it doesn't usually matter if exceptions are a little slow, but I'd like to understand the performance a little better. If anyone knows where I can find notes on how the exception propagation mechanism works at a fairly low level that would also be helpful. I'm trying to get a picture of where the costs come from, aside from calling destructors as the stack unwinds.