microsoft / STL

MSVC's implementation of the C++ Standard Library.
Other
10.05k stars 1.48k forks source link

`<xutility>`: Consider enabling unsized `memchr` optimization after solving it for ARM64 #2866

Closed AlexGuteniev closed 7 months ago

AlexGuteniev commented 2 years ago

DevCom-1615707 is Fixed - Pending Release. This means we can remove this workaround:

https://github.com/microsoft/STL/blob/ef62d3fa0b8e4e2406b9bb74e916e1ca8a1df802/stl/inc/xutility#L4882

This should allow optimizing unsized ranges search when vector algorithms are not enabled. This may be helpful for non-x86.

But the other ARM-specific bug should be taken care of - see https://github.com/microsoft/STL/pull/2434/files#r839094547

CaseyCarter commented 2 years ago

Clarifying: "memchr inspects bytes after the match" will be fixed on x86/x64 in 17.4p2 when the redist is unlocked and we ship a new VCRuntime (VSO-1452447). It hasn't yet been fixed for ARM/ARM64/ARM64EC (VSO-1538014).

"memchr returns NULL when count == SIZE_MAX on arm64" (VSO-1488938) was closed as unreproducible on May 9. Can we still repro that bug?

CaseyCarter commented 1 year ago

A fix for VSO-1538014 was just checked in. I think it will ship in v17.8p1, at which time this issue will become unblocked.

StephanTLavavej commented 7 months ago

Workaround removed by #4083, thanks @AlexGuteniev for the programmer-archaeology.