[Bug libfortran/50016] The fortran program 's io is very slow

xunxun1982 at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 8 12:36:00 GMT 2011


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.



More information about the Gcc-bugs mailing list