public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/6588: throw() takes 20,000 cycles : is it expected ?
@ 2002-05-08 15:06 Richard Henderson
0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2002-05-08 15:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR optimization/6588; it has been noted by GNATS.
From: Richard Henderson <rth@redhat.com>
To: Sylvain.Pion@sophia.inria.fr
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/6588: throw() takes 20,000 cycles : is it expected ?
Date: Wed, 8 May 2002 14:56:51 -0700
On Mon, May 06, 2002 at 11:35:50PM -0000, Sylvain.Pion@sophia.inria.fr wrote:
> The sequence throw/catch appears to take about 20,000 cycles
> on a Pentium III. Is this expected ?
Not unexpected.
> Is there a way to speed this up ?
I doubt it.
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: optimization/6588: throw() takes 20,000 cycles : is it expected ?
@ 2002-05-08 15:16 Richard Henderson
0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2002-05-08 15:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR optimization/6588; it has been noted by GNATS.
From: Richard Henderson <rth@redhat.com>
To: Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/6588: throw() takes 20,000 cycles : is it expected ?
Date: Wed, 8 May 2002 15:10:47 -0700
On Wed, May 08, 2002 at 11:58:18PM +0200, Sylvain Pion wrote:
> I made some benchmarks with the SunPro compiler, and it's 20 times faster.
> (maybe it's not as correct as GCC, though)
One of the changes for gcc 3.0 (that probably made it slower)
is that we support throwing exceptions between languages.
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: optimization/6588: throw() takes 20,000 cycles : is it expected ?
@ 2002-05-08 15:06 Sylvain Pion
0 siblings, 0 replies; 4+ messages in thread
From: Sylvain Pion @ 2002-05-08 15:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR optimization/6588; it has been noted by GNATS.
From: Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
To: Richard Henderson <rth@redhat.com>
Cc: Sylvain.Pion@sophia.inria.fr, gcc-gnats@gcc.gnu.org
Subject: Re: optimization/6588: throw() takes 20,000 cycles : is it expected ?
Date: Wed, 8 May 2002 23:58:18 +0200
On Wed, May 08, 2002 at 02:56:51PM -0700, Richard Henderson wrote:
> > The sequence throw/catch appears to take about 20,000 cycles
> > on a Pentium III. Is this expected ?
>
> Not unexpected.
:(
> > Is there a way to speed this up ?
>
> I doubt it.
:((
I made some benchmarks with the SunPro compiler, and it's 20 times faster.
(maybe it's not as correct as GCC, though)
--
Sylvain
^ permalink raw reply [flat|nested] 4+ messages in thread
* optimization/6588: throw() takes 20,000 cycles : is it expected ?
@ 2002-05-06 16:36 Sylvain.Pion
0 siblings, 0 replies; 4+ messages in thread
From: Sylvain.Pion @ 2002-05-06 16:36 UTC (permalink / raw)
To: gcc-gnats; +Cc: Sylvain.Pion
>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:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-05-08 22:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-08 15:06 optimization/6588: throw() takes 20,000 cycles : is it expected ? Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2002-05-08 15:16 Richard Henderson
2002-05-08 15:06 Sylvain Pion
2002-05-06 16:36 Sylvain.Pion
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).