From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5233 invoked by alias); 25 Mar 2004 14:37:07 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 5219 invoked by uid 48); 25 Mar 2004 14:37:04 -0000 Date: Thu, 25 Mar 2004 14:37:00 -0000 Message-ID: <20040325143704.5218.qmail@sources.redhat.com> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040312233606.14563.paulthomas2@wanadoo.fr> References: <20040312233606.14563.paulthomas2@wanadoo.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/14563] octave built under Cygwin very slow X-Bugzilla-Reason: CC X-SW-Source: 2004-03/txt/msg03029.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2004-03-25 14:36 ------- SJLJ stands for "setjmp/longjmp". I'm not an expert in this field (as I know virtually nothing about the gcc interiors anyway, I'm just the bug database dude), but here's the idea: when you call a function that may or may not throw an exception, and the calling function needs to run destructors of local objects in case an exception is thrown, you need to put down the address of the cleanup code somewhere. One way to do this is to set this address via setjmp, and throwing an exception then transfers control to this place via longjmp. This is expensive since you have to call setjmp every time a cleanup is necessary. The other possibility is to use lookup tables that the compiler generates statically, so this is cheap at run-time, but incurs some code overhead. If you generate an exception, you have to somehow look up where to transfer execution. Don't ask me how exactly this works, but it is to my best knowledge how dwarf2 exception unwinding works. Corrections on this topic my more knowledgable people are certainly welcome. Now back to the question how we can figure out what the problem is: if using -fno-exceptions doesn't work, is there a possibility you repeat your experiments with an octave version prior to the introduction of exceptions? W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14563