Re: [PATCH 3/4] libstdc++: avoid character accumulation in istreambuf_iterator

2017-11-16 Thread Paolo Carlini
Hi, On 16/11/2017 12:41, Petr Ovtchenkov wrote: This part of code is from SGI, so I suspect that nobody here really measure performance difference between "bufferred" and "non-buffered" implementations. Here where? The GNU libstdc++-v3 implementation? Certainly we did, as I tried to tell you

Re: [PATCH 3/4] libstdc++: avoid character accumulation in istreambuf_iterator

2017-11-16 Thread Petr Ovtchenkov
On Thu, 16 Nov 2017 12:29:37 +0100 Paolo Carlini wrote: > Hi, > > On 16/11/2017 12:03, Petr Ovtchenkov wrote: > > On Thu, 16 Nov 2017 10:39:02 +0100 > > Paolo Carlini wrote: > > > >> Hi, > >> > >> On 16/11/2017 06:31, Petr Ovtchenkov wrote: >

Re: [PATCH 3/4] libstdc++: avoid character accumulation in istreambuf_iterator

2017-11-16 Thread Paolo Carlini
Hi, On 16/11/2017 12:03, Petr Ovtchenkov wrote: On Thu, 16 Nov 2017 10:39:02 +0100 Paolo Carlini wrote: Hi, On 16/11/2017 06:31, Petr Ovtchenkov wrote: Is we really worry about frozen sizeof of instantiated template? Yes we do. See

Re: [PATCH 3/4] libstdc++: avoid character accumulation in istreambuf_iterator

2017-11-16 Thread Petr Ovtchenkov
On Thu, 16 Nov 2017 10:39:02 +0100 Paolo Carlini wrote: > Hi, > > On 16/11/2017 06:31, Petr Ovtchenkov wrote: > > Is we really worry about frozen sizeof of instantiated template? > Yes we do. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html > under

Re: [PATCH 3/4] libstdc++: avoid character accumulation in istreambuf_iterator

2017-11-16 Thread Paolo Carlini
Hi, On 16/11/2017 06:31, Petr Ovtchenkov wrote: Is we really worry about frozen sizeof of instantiated template? Yes we do. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html under "Prohibited Changes", point 8. Of course removing the buffering has performance implications too -

Re: [PATCH 3/4] libstdc++: avoid character accumulation in istreambuf_iterator

2017-11-15 Thread Petr Ovtchenkov
On Wed, 15 Nov 2017 22:31:11 +0100 Paolo Carlini wrote: > Hi, > > On 15/11/2017 11:48, Petr Ovtchenkov wrote: > > Ask associated streambuf for character when needed instead of > > accumulate it in istreambuf_iterator object. > > > > Benefits from this: > >- minus

Re: [PATCH 3/4] libstdc++: avoid character accumulation in istreambuf_iterator

2017-11-15 Thread Paolo Carlini
Hi, On 15/11/2017 11:48, Petr Ovtchenkov wrote: Ask associated streambuf for character when needed instead of accumulate it in istreambuf_iterator object. Benefits from this: - minus one class member in istreambuf_iterator - trivial synchronization of states of istreambuf_iterator

[PATCH 3/4] libstdc++: avoid character accumulation in istreambuf_iterator

2017-11-15 Thread Petr Ovtchenkov
Ask associated streambuf for character when needed instead of accumulate it in istreambuf_iterator object. Benefits from this: - minus one class member in istreambuf_iterator - trivial synchronization of states of istreambuf_iterator and associated streambuf ---