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

Paolo Carlini pcarlini@unitus.it
Mon Jun 16 19:09:00 GMT 2003


Nathan Myers wrote:

>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.
>
I see, thanks.

Interestingly, it looks like many systems actually use BUFSIZ ~ 1024 or 
< 8192:

    http://www.pimpworks.org/security/telnetd.txt

Paolo.



More information about the Libstdc++ mailing list