This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: [RFTesters] Make portable sgetn/1-in and 1-io tests


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


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