This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]