This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/50016] The fortran program 's io is very slow
- From: "jb at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 8 Aug 2011 11:51:38 +0000
- Subject: [Bug libfortran/50016] The fortran program 's io is very slow
- Auto-submitted: auto-generated
- References: <bug-50016-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016
Janne Blomqvist <jb at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jb at gcc dot gnu.org
--- Comment #6 from Janne Blomqvist <jb at gcc dot gnu.org> 2011-08-08 11:51:34 UTC ---
Maybe this is MingW specific?
I haven't tested this, but here goes my guess:
Since in the write loop we're jumping back and forth across the file, the
buffer must be frequently flushed; in libgfortran/io/unix.c (buf_flush) we have
in the trunk and 4.6 branch:
#ifdef _WIN32
_commit (s->fd);
#endif
If this is some kind of win32 equivalent to fsync(), i.e. commit stuff to disk,
then it's no surprise it's slow?
This code was added to buf_flush() as a response to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44698 .