[patch, libgfortran] PR33985 access="stream",form="unformatted" doesn't buffer

Jerry DeLisle jvdelisle@verizon.net
Sun Dec 2 23:19:00 GMT 2007

I plan to commit the attached patch approved by Thomas in the PR report.

The patch adds simple tests for "stream" I/O to avoid unnecessary seeks and 
flushes.  Gives substantial performance improvement.

Regression tested on x86-64-linux-gnu.

No new test cases.

Thanks to Thomas for testing, reviewing, and some of the concept here.


2007-12-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
	    Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/33985
	* io/transfer.c (read_block, read_block_direct, write_block, write_buf):
	Don't seek if file position is already there for STREAM I/O.
	(finalize_transfer): For STREAM I/O don't flush unless the file position
	has moved past the start position before the transfer.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr33985-g.diff
Type: text/x-patch
Size: 2470 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20071202/15a4c80f/attachment.bin>

More information about the Gcc-patches mailing list