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 libstdc++/11378] Unbuffered sputn is slow


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11378



------- Additional Comments From peturr02 at ru dot is  2003-06-30 10:53 -------
Created an attachment (id=4308)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4308&action=view)
Tool for comparin unbuffered IO performance

Here are some results for my machine (Pentium III Xeon 500MHz, 512MB RAM):
time ./speed stdio 100000 10
0.12user 1.09system 0:01.21elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (82major+12minor)pagefaults 0swaps
time ./speed iostream 100000 10
0.94user 9.80system 0:10.76elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (84major+12minor)pagefaults 0swaps
It seems that fwrite is O(N) but basic_filebuf::sputn is O(M * N) where N is
the number of iterations and M the number of bytes written per iteration.


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