You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Optimized string.Replace(char, char) vector code path
* Optimized code pathes even further
* Do vectorized operation at the end of the string only once
When the remaining length is a multiple of the vector size, then the remainder is processed twice. This is redundant, and not needed.
This commit changes that, so that the remainder is processed only once when the remaining elements match.
* Don't use trick for collapsed epilogs
Cf. #67049 (comment)
* Handle remainder vectorized even if remainingLength <= Vector<ushort>.Count and added tests for this
* Introduce (internal) Vector.LoadUnsafe and Vector.StoreUnsafe and use it in string.Replace(char, char)
* Avoid Unsafe.As<char, ushort> reinterpret casts by introducing string.GetRawStringDataAsUshort() internal method
* Fixed copy/paste error (from local dev to repo)
* PR Feedback
* Fixed bug and added tests for this
* Make condition about lengthToExamine clearer as suggested
Co-authored-by: Günther Foidl <[email protected]>
0 commit comments