This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFTesters] Make portable sgetn/1-in and 1-io tests
- From: Nathan Myers <ncm-nospam at cantrip dot org>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 16 Jun 2003 11:44:39 -0700
- Subject: Re: [RFTesters] Make portable sgetn/1-in and 1-io tests
- References: <3EEE0242.1010707@unitus.it>
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