IO speed slipping again?

Paolo Carlini pcarlini@unitus.it
Fri Jun 13 15:37:00 GMT 2003


Jerry Quinn wrote:

>Hi, all.  For a little while, the mainline library has been giving
>output speeds close to gcc 2.95 (within 10-20%).  Some time in the
>last week or two, the library slowed way down again.  Do any of you
>know what might have happened?  Fallout from Paolo's work?  If not,
>I'll try to do a search and locate the patch.
>
Hi Jerry. What you are reporting is really sad... Honestly, I don't
think something wrong can have happened with my last unbuffered
filebuf bits. For my favorite testcase in the filebuf area,
libstdc++/9876, that is:

#include <fstream>
#include "speed.hh"

int main()
{
  using namespace std;

  filebuf buf;
  buf.open("tmp", ios::out | ios::in | ios::trunc);
  for (int i = 0; i < iterations; ++i)
    {
      buf.sputc(i % 100);
    }
  buf.close();
  return 0;
}

with iterations == 100000000, I'm still seeing a good
(P4-2400-linux, -O2):
1.930u 0.410s 0:02.40 97.5%     0+0k 0+0io 207pf+0w

vs (3.3, same testing setup)

3.760u 0.380s 0:04.25 97.4%     0+0k 0+0io 196pf+0w

Therefore, I tend to suspect something in the upper layers.

Thanks,
Paolo.



More information about the Libstdc++ mailing list