public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Toon Moene <toon@moene.indiv.nluug.nl>
To: Peter.Bienstman@rug.ac.be
Cc: egcs@cygnus.com
Subject: Re: performance of complex arithmetic
Date: Wed, 27 Jan 1999 06:28:00 -0000	[thread overview]
Message-ID: <36AF2013.88410A1@moene.indiv.nluug.nl> (raw)
In-Reply-To: <199901260908.KAA19127@allserv.rug.ac.be>

Peter Bienstman wrote:

> I have a question regarding EGCS's performance on complex arithmetic.

> '-fno-emulate-complex'
>      Implement `COMPLEX' arithmetic using the facilities in the `gcc'
>      back end that provide direct support of `complex' arithmetic,
>      instead of emulating the arithmetic.
> 
>      `gcc' has some known problems in its back-end support for
>      `complex' arithmetic, due primarily to the support not being
>      completed as of version 2.7.2.2.  Other front ends for the `gcc'
>      back end avoid this problem by emulating `complex' arithmetic at a
>      higher level, so the back end sees arithmetic on the real and
>      imaginary components.
> 
> Is it true that the g++ ang g77 frontends still emulate complex arithmetic?
> This would seem like a significant performance penalty, as the optimiser
> would probably miss out on some optimisations.

Worse even, we _know_ it does.

The (remaining) problems seem to concentrate on targets with 64 bit
words using single precision complex.  AFAICD, 32 bit targets do not
suffer from "native complex" bugs anymore in current snapshots.

To check this, I ran LAPACK's testsuite to completion on my Pentium II
based laptop, using:

[toon@moene LAPACK]$ /usr/snp/bin/gcc -v
Reading specs from
/usr/snp/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.03/specs
gcc version egcs-2.93.03 19990125 (gcc2 ss-980609 experimental)

with the following options:

OPTS     = -g -O3 -funroll-loops -fomit-frame-pointer
-fno-emulate-complex -malign-double

without any problem.

Eliminating the -fno-emulate-complex option, I ran into the same problem
as Josip Loncaric, namely that xlintstc (test driver for the single
precision complex LINear algebra routines) crashed.  Because about one
eighth of the complete LAPACK distribution is linked in with this
program, there's little use posting the constituent parts here ;-)

People who'd like to investigate this have to download the LAPACK
distribution themselves (which, BTW, is a very good test tool for a
Fortran compiler by itself).

One note of caution, though:  Although the distribution itself is only
about 4.5 Mb gzip'd, after unpacking and building you need about 120 Mb.

Cheers,

-- 
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: fortran@gnu.org; egcs: egcs-bugs@cygnus.com

WARNING: multiple messages have this Message-ID
From: Toon Moene <toon@moene.indiv.nluug.nl>
To: Peter.Bienstman@rug.ac.be
Cc: egcs@cygnus.com
Subject: Re: performance of complex arithmetic
Date: Sun, 31 Jan 1999 23:58:00 -0000	[thread overview]
Message-ID: <36AF2013.88410A1@moene.indiv.nluug.nl> (raw)
Message-ID: <19990131235800.ruiP500LJ16qM98XIPhYGs4T8bKjB7gGMHhtA7ZEleY@z> (raw)
In-Reply-To: <199901260908.KAA19127@allserv.rug.ac.be>

Peter Bienstman wrote:

> I have a question regarding EGCS's performance on complex arithmetic.

> '-fno-emulate-complex'
>      Implement `COMPLEX' arithmetic using the facilities in the `gcc'
>      back end that provide direct support of `complex' arithmetic,
>      instead of emulating the arithmetic.
> 
>      `gcc' has some known problems in its back-end support for
>      `complex' arithmetic, due primarily to the support not being
>      completed as of version 2.7.2.2.  Other front ends for the `gcc'
>      back end avoid this problem by emulating `complex' arithmetic at a
>      higher level, so the back end sees arithmetic on the real and
>      imaginary components.
> 
> Is it true that the g++ ang g77 frontends still emulate complex arithmetic?
> This would seem like a significant performance penalty, as the optimiser
> would probably miss out on some optimisations.

Worse even, we _know_ it does.

The (remaining) problems seem to concentrate on targets with 64 bit
words using single precision complex.  AFAICD, 32 bit targets do not
suffer from "native complex" bugs anymore in current snapshots.

To check this, I ran LAPACK's testsuite to completion on my Pentium II
based laptop, using:

[toon@moene LAPACK]$ /usr/snp/bin/gcc -v
Reading specs from
/usr/snp/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.03/specs
gcc version egcs-2.93.03 19990125 (gcc2 ss-980609 experimental)

with the following options:

OPTS     = -g -O3 -funroll-loops -fomit-frame-pointer
-fno-emulate-complex -malign-double

without any problem.

Eliminating the -fno-emulate-complex option, I ran into the same problem
as Josip Loncaric, namely that xlintstc (test driver for the single
precision complex LINear algebra routines) crashed.  Because about one
eighth of the complete LAPACK distribution is linked in with this
program, there's little use posting the constituent parts here ;-)

People who'd like to investigate this have to download the LAPACK
distribution themselves (which, BTW, is a very good test tool for a
Fortran compiler by itself).

One note of caution, though:  Although the distribution itself is only
about 4.5 Mb gzip'd, after unpacking and building you need about 120 Mb.

Cheers,

-- 
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: fortran@gnu.org; egcs: egcs-bugs@cygnus.com

  reply	other threads:[~1999-01-27  6:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-26  1:08 Peter Bienstman
1999-01-27  6:28 ` Toon Moene [this message]
1999-01-31 23:58   ` Toon Moene
1999-01-31 23:58 ` Peter Bienstman
1999-01-26 19:24 Stephen L Moshier
1999-01-27  0:33 ` Michael Hayes
1999-01-31 23:58   ` Michael Hayes
1999-01-27  1:37 ` Peter Bienstman
1999-01-27  9:25   ` Stephen L Moshier
1999-01-27  9:55     ` Joe Buck
1999-01-31 23:58       ` Joe Buck
1999-01-31 23:58     ` Stephen L Moshier
1999-01-27 13:24   ` craig
1999-01-27 13:45     ` Stephen L Moshier
1999-01-31 23:58       ` Stephen L Moshier
1999-01-31 23:58     ` craig
1999-01-31 23:58   ` Peter Bienstman
1999-01-31 23:58 ` Stephen L Moshier
1999-01-27 14:00 Billinghurst, David (RTD)
1999-01-31 23:58 ` Billinghurst, David (RTD)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36AF2013.88410A1@moene.indiv.nluug.nl \
    --to=toon@moene.indiv.nluug.nl \
    --cc=Peter.Bienstman@rug.ac.be \
    --cc=egcs@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).