http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38199
--- Comment #29 from Manfred Schwarb <manfred99 at gmx dot ch> --- The regression flag was re-added by Tobias in comment 23 due to a regression in the testcase of comment 21: !234567 character buffer*100000 integer i,j DO j=1,9999 write(buffer,'(i4)') j write(*,*) buffer(1:4) read(buffer,'(i100000)') i write(*,*) i ENDDO end Here are the profiles of gfortran 4.6: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls Ts/call Ts/call name 97.45 3.06 3.06 _gfortrani_read_decimal 1.59 3.11 0.05 memset 0.64 3.13 0.02 __write_nocancel 0.32 3.14 0.01 format_lex 0.00 3.14 0.00 1 0.00 0.00 main and gfortran trunk: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls Ts/call Ts/call name 59.96 2.71 2.71 read_utf8 38.72 4.46 1.75 _gfortrani_read_decimal 0.66 4.49 0.03 memset 0.22 4.50 0.01 fflush 0.22 4.51 0.01 formatted_transfer 0.22 4.52 0.01 malloc_consolidate 0.00 4.52 0.00 1 0.00 0.00 main so the difference is obvious, the utf8 treatment makes the difference. Is there a possibility to speed up reading the trivial cases? 99.99% of fortran input will be ASCII, I guess... And again, the magical approach is to add LEN_TRIM to avoid reading 100000 space characters and interpreting them as utf8. So if something like Thomas' patch could be applied also for formatted reads, this would speed up things dramatically as well.