This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

optimization/6588: throw() takes 20,000 cycles : is it expected ?



>Number:         6588
>Category:       optimization
>Synopsis:       throw() takes 20,000 cycles : is it expected ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Mon May 06 16:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sylvain Pion
>Release:        3.1 and 3.2
>Organization:
>Environment:
Reading specs from /u/zosma/0/prisme/spion/gcc/Linux_trunc/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: /u/zosma/0/prisme/spion/gcc/gcc_trunc/configure --disable-shared --disable-nls --enable-languages=c++ --prefix=/u/zosma/0/prisme/spion/gcc/Linux_trunc --with-gnu-as --with-gnu-ld --with-as=/u/zosma/0/prisme/spion/gcc/Binutils/Linux/bin/as --with-ld=/u/zosma/0/prisme/spion/gcc/Binutils/Linux/bin/ld
Thread model: single
gcc version 3.2 20020505 (experimental)
>Description:
The sequence throw/catch appears to take about 20,000 cycles
on a Pentium III.  Is this expected ?
Is there a way to speed this up ?
Even if this sequence is not supposed to happen often, the
fact that it's very slow can have a visible impact on global
performance.
>How-To-Repeat:
// Compile with optimization the following code,
// It takes more than 20 seconds to execute on my
// Pentium III at 933 MHz.
int main()
{
  for (int i=0; i<1000000; ++i)
  {
    try {
      throw(0);
    }
    catch (...) {
    }
  }
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]