Re: Avoids std::distance calls

2018-06-04 Thread François Dumont
On 04/06/2018 23:09, Jonathan Wakely wrote: On 04/06/18 22:13 +0200, François Dumont wrote: Hi I'd like to propose this patch to avoid std::distance calls. In a number of situation in algos we already have the size of the buffer we need so we shouldn't have to compute it again. Just one pla

Re: Avoids std::distance calls

2018-06-04 Thread Jonathan Wakely
On 04/06/18 22:13 +0200, François Dumont wrote: Hi I'd like to propose this patch to avoid std::distance calls. In a number of situation in algos we already have the size of the buffer we need so we shouldn't have to compute it again. Just one place, in __inplace_merge, no? I don't think th

Avoids std::distance calls

2018-06-04 Thread François Dumont
Hi I'd like to propose this patch to avoid std::distance calls. In a number of situation in algos we already have the size of the buffer we need so we shouldn't have to compute it again. I don't think there is any abi concern for this inline constructor, isn't there ?     * include/bits/st