This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/16339] Unformatted i/o on large arrays inefficient
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Mar 2005 10:47:46 -0000
- Subject: [Bug libfortran/16339] Unformatted i/o on large arrays inefficient
- References: <20040703014226.16339.rth@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From Thomas dot Koenig at online dot de 2005-03-04 10:47 -------
This is really _very_ inefficient, by a factor of 20.
Some test numbers:
$ g77 write-record.f
$ time ./a.out
real 0m1.819s
user 0m1.774s
sys 0m0.044s
$ gfortran write-record.f
$ time ./a.out
real 0m43.723s
user 0m9.003s
sys 0m34.571s
$ cat write-record.f
program main
integer n
parameter (n=10000000)
real a(n)
write (10) (a(i),i=1,n)
end
$ gfortran -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: ../gcc-4.1-20050227/configure --prefix=/home/zfkts
--enable-languages=c,f95
Thread model: posix
gcc version 4.1.0 20050227 (experimental)
By comparison:
$ ifort write-record.f
$ time ./a.out
real 0m0.117s
user 0m0.001s
sys 0m0.116s
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16339