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: "xunxun1982 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 8 Aug 2011 12:35:16 +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
--- Comment #8 from PcX <xunxun1982 at gmail dot com> 2011-08-08 12:35:12 UTC ---
(In reply to comment #7)
> (In reply to comment #6)
> > 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 .
>
> That sounds reasonable.
> So this bug is fixed in the trunk, but haven't been backported to 4.6?
Sorry, I'm wrong.
I think I can try 4.7 to test this.