[Patch, libgfortran] PR 25561 Part 1/2 Get rid of alloc stream
Janne Blomqvist
blomqvist.janne@gmail.com
Tue May 13 19:03:00 GMT 2008
Hello,
compared to the previous submission
http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00268.html
this patch now regtests cleanly due to the introduction of a format
buffer to correctly handle T and TL edit descriptors on non-seekable
files. Currently the default size of the format buffer is 4 KB. This is
perhaps a bit on the large side, my thinking was that it should be large
enough to cover everything but the most pathological testcases without
having to do a realloc. Perhaps a more modest, say, 512 bytes would be
more than enough to cover the common cases. The format buffer is flushed
after every write statement, relying on the underlying buffering to
avoid too much syscall overhead.
There is still a single use of salloc left in the library; however this
is only used for internal files, thus paving the way for using stdio for
external files as explained in the message linked above.
Performance-wise, at the moment it is roughly the same as without the
patch. For stream I/O there should be a performance increase, as the
patch reduces unnecessary seeks. Comparing the testio.f90 benchmark
Jerry provided with ifort 9.1, there is still lots of room for improvement.
For the NIST tests, it still fails FM111, FM406 and FM903 if I'm
interpreting the results correctly, but it seems 4.2 and 4.3 have the
same problems (406 passes on 4.2 and fails on 4.3) so I don't think it's
a regression?
Ok for trunk?
--
Janne Blomqvist
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080513/760deeb3/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr25561-part1.diff
Type: text/x-patch
Size: 45351 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080513/760deeb3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080513/760deeb3/attachment.sig>
More information about the Fortran
mailing list