Remove algo logic duplication Round 3
François Dumont
frs.dumont@gmail.com
Fri Sep 27 21:23:00 GMT 2013
On 09/27/2013 06:42 PM, Paolo Carlini wrote:
> Hi,
>
> On 9/26/13 3:53 PM, François Dumont wrote:
>> On 09/24/2013 04:01 PM, Christopher Jefferson wrote:
>>> I have read over this patch, and think it is good.
>>>
>>> Now I can see the patch in a more readable form (and have applied it),
>>> I now agree with this method of combining the algorithms. I did some
>>> simple benchmarking and could not measure a difference with and
>>> without this patch.
>>
>> Good, the patch is more to clean the code of all its redundancy but
>> it is good that you confirm that it hasn't any performance drawback.
>> I hope a small enhancement for the debug mode but nothing tremendous.
>> Even normal mode could be better cause I remember some duplications
>> where using __find_if on one side and a manual while loop on the
>> other, I kept the __find_if that have an optimization for random
>> access iterators.
>>
>> Here is again the version I have plan to commit cause when I review
>> it to write the ChangeLog I detect some problems. You will also see
>> what I have plan to do to fix parallel mode.
> Nit: it seems to me that the mismatch overloads you are adding to
> parallel/algobase.h should be inline. More generally, I would
> recommend double checking that all the obvious inline are there before
> committing.
>
> Well, I have another, stylistic, nit: in general lines should not end
> with an open round bracket - I'm pretty sure you will not find
> instances of that in the compiler proper and I don't think it's part
> of the special rules of the C++ library - but please don't take this
> as prerequisite for committing, if it involves tweaking too many lines.
>
> Thanks again!
> Paolo.
>
Patch applied.
I have added some inline and especially on those in parallel mode.
Could you show me an example of invalid open round bracket cause I do
not normally do what you describe and I can't see any.
François
More information about the Libstdc++
mailing list