https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91690

            Bug ID: 91690
           Summary: Slow IEEE intrinsics
           Product: gcc
           Version: 9.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: townsend at astro dot wisc.edu
  Target Milestone: ---

Created attachment 46844
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46844&action=edit
Demo program

The intrinsics provided by the IEEE_ARITHMETIC module appear to be
significantly slower than an equivalent implementation based on inspecting
bits.

I attach a short program that demonstrates this. Compiling with

gfortran -O2 -o test_ieee test_ieee.f90

...I get the following output:

  Using IEEE
    time:   16.1860008    
 Using bits
    time:  0.101000004 

So, the IEEE_IS_NAN() intrinsic appears to be ~160 times slower than inspecting
bits directly. Other intrinsics seem to show similar issues.

cheers,

Rich

Reply via email to