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


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.


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