Experimental results splitting formatted read and write
Jerry DeLisle
jvdelisle@verizon.net
Mon Dec 8 07:40:00 GMT 2008
Jerry DeLisle wrote:
> As an experiment, I split out the formatted_transfer_scaler into
> formatted_transfer_scaler_read and formatted_transfer_scaler_write
> finctions, eliminating all the if reading conditionals.
>
Some additional data from gprof: You can see that the processing of the format
string and "traversing" the format tokens is beginning to dominate. For constant
format strings, all of that could be done at compile time and stored as a
pointer to a token list or even a list of format helper functions. I wonder if
g77 does anything like this?
Each sample counts as 0.01 seconds.
% cumulative self
time seconds seconds name
13.71 0.85 0.85 __mpn_mul_1
11.29 1.55 0.70 ___printf_fp
6.77 1.97 0.42 format_lex
5.40 2.31 0.34 formatted_transfer_scalar_write
4.92 2.61 0.31 next_char
4.52 2.89 0.28 __write_nocancel
3.87 3.13 0.24 __umodti3
3.55 3.35 0.22 vfprintf
3.39 3.56 0.21 parse_format_list
3.23 3.76 0.20 get_fnode
3.15 3.96 0.20 next_format0
2.26 4.10 0.14 __udivti3
2.18 4.23 0.14 formatted_transfer
2.10 4.36 0.13 data_transfer_init
1.77 4.47 0.11 ____strtol_l_internal
1.61 4.57 0.10 T.123
1.61 4.67 0.10 _gfortrani_next_format
1.29 4.75 0.08 _IO_default_xsputn
1.29 4.83 0.08 __ctype_toupper_loc
1.29 4.91 0.08 memcpy
More information about the Fortran
mailing list