[RFTesters] Make portable sgetn/1-in and 1-io tests
Nathan Myers
ncm-nospam@cantrip.org
Mon Jun 16 18:43:00 GMT 2003
On Mon, Jun 16, 2003 at 07:45:38PM +0200, Paolo Carlini wrote:
> perhaps I have nailed down the reason underlying the
> failure on *many* platforms of 27_io/basic_filebuf/sgetn/char/1-in.cc
> and 1-io.cc: seems due to the value of BUFSIZ not being
> 8192 everywhere.
My experiments suggested that 8192 really is (still) optimal, among
powers of 2, on a P3 at 1.4 GHz and a P2 at 300 MHz, for the case of
_CharT=char. 8K was surprisingly better than 32K and 64K, and slightly
better than 4K, a fact that must be connected to the size of L1 cache.
I didn't try wchar_t.
Nonetheless, I wonder if the default buffer size for filebuf should be
BUFSIZ/sizeof(_CharT), or 2K for wchar_t. It seems worth making the
change until somebody does the measurements and tells us to change it.
Nathan Myers
ncm-nospam@cantrip.org
More information about the Libstdc++
mailing list