[Bug fortran/38199] missed optimization, regression: I/O performance

2008-11-20 Thread jb at gcc dot gnu dot org


--- Comment #1 from jb at gcc dot gnu dot org  2008-11-20 14:04 ---
I'm looking at I/O performance as part of PR 25561 (see also PR 37754, perhaps
this is a dup?), but my changes are invasive enough that they are 4.5 material.
Thanks for the report.


-- 

jb at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||jb at gcc dot gnu dot org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-11-20 14:04:55
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38199



[Bug fortran/38199] missed optimization, regression: I/O performance

2008-11-20 Thread manfred99 at gmx dot ch


--- Comment #2 from manfred99 at gmx dot ch  2008-11-20 14:59 ---
The profiling of the second testcase gives
  %   cumulative   self  self total
 time   seconds   secondscalls  Ts/call  Ts/call  name
 44.20  8.34 8.34 next_char
 24.85 13.03 4.69 mem_read
 17.04 16.25 3.22 memcpy
  4.98 17.19 0.94 eat_spaces
  4.03 17.95 0.76
_gfortrani_empty_internal_buffer
  2.44 18.41 0.46 nml_query
  2.09 18.80 0.40 strncasecmp_l
  0.21 18.84 0.04 memset
  0.05 18.85 0.01 __divti3
  0.05 18.86 0.01 _gfortrani_write_block
  0.05 18.87 0.01 next_char
  0.00 18.87 0.001 0.00 0.00  MAIN__


It seems gfortran reads character by character and does not take
any opportunities to shortcut the read process.

For this case, one could imagine that the read routine would scan for the
last non-blank character and would stop reading at this position.

Perhaps ifort is doing exactly this.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38199