libstdc++: Extend memcmp optimization in std::lexicographical_compare

Jonathan Wakely jwakely@redhat.com
Mon Jun 8 21:08:06 GMT 2020


On 08/06/20 19:20 +0100, Jonathan Wakely wrote:
>On 05/06/20 22:24 +0200, François Dumont via Libstdc++ wrote:
>>Hi
>>
>>    Here is the last of my algo patches this time to extend the 
>>memcmp optimization to std::deque iterators and _GLIBCXX_DEBUG mode.
>>
>>    To do so I had to return int in implementation details of 
>>lexicographical_compare to make sure we can treat a deque iterator 
>>range by chunk in a performant way.

Here's a simpler version, which doesn't alter anything for the
existing code (i.e. all iterators that aren't deque iterators) and
also fixes the infinite loop bug.

This seems simpler and less invasive.

Please take a look.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 20609 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20200608/b9b8b827/attachment-0001.bin>


More information about the Libstdc++ mailing list