Keeping in mind that correct is better than fast. I would like to start
looking at refactoring the I/O library to eliminate some of the overhead.
Beginning with internal units where there is no need for alloc buffering like
we do now,
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
18.02 1.84 1.84 next_char
10.87 2.95 1.11 _gfortrani_read_sf
7.84 3.75 0.80 _gfortrani_is_array_io
5.83 4.35 0.60 memcpy
5.83 4.94 0.60 push_char
5.68 5.52 0.58 read_real
5.58 6.09 0.57 ____strtod_l_internal
5.19 6.62 0.53 fd_alloc_r_at
4.60 7.09 0.47 mem_alloc_r_at
3.92 7.49 0.40 eat_spaces
3.77 7.88 0.39 _gfortrani_is_stream_io
2.89 8.17 0.30
list_formatted_read_scalar
2.55 8.43 0.26
_gfortrani_is_internal_unit
2.25 8.66 0.23 __read_nocancel
1.13 8.78 0.12 _gfortran_transfer_array
1.08 8.89 0.11 _gfortrani_convert_real
1.08 9.00 0.11 nml_bad_return
0.88 9.09 0.09 eat_line
0.88 9.18 0.09 str_to_mpn
0.83 9.26 0.09
_gfortrani_list_formatted_read
0.78 9.34 0.08 __lseek_nocancel
--
Summary: libgfortran I/O performance issues
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jvdelisle at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31501