-
Couldn't load subscription status.
- Fork 5.2k
Closed
Labels
area-System.MemoryenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issuePerformance related issue
Milestone
Description
This is specific to portable span (and not fast span).
We do not need to allocate and call the string APIs when StringComparison is Ordinal or OrdinalIgnoreCase.
Similar to APIs like EndsWith/etc., add a non-allocating code path for CompareTo for Ordinal:
https://github.com/dotnet/corefx/blob/42d5370f8c6cec8d1961f54a0974e52b0562b0a7/src/System.Memory/src/System/MemoryExtensions.Portable.cs#L23
Also optimize for OrdinalIgnoreCase for all the string-like APIs.
See: dotnet/corefx#27319 (comment)
cc @tarekgh
Metadata
Metadata
Assignees
Labels
area-System.MemoryenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issuePerformance related issue