Runtime: Consider optimizing Span IndexOf for OrdinalIgnoreCase (portable span)

Created on 21 Mar 2018  路  7Comments  路  Source: dotnet/runtime

This is specific to portable span (and not fast span).

We do not necessarily need to allocate and call the string APIs when StringComparison is OrdinalIgnoreCase for IndexOf.

See https://github.com/dotnet/corefx/pull/28239#issue-176098021 for details and a proposed implementation of IndexOfOrdinalIgnoreCase as a starting point.

We would need to test and measure to make sure there isn't significant regression for certain cases as part of the optimization for the common/general case.

area-System.Memory

Most helpful comment

test "portable" code do you use netfx switch?

That's what I do. More specifically, after doing a full build with -framework=netfx, then iterating with /p:TargetGroup=netfx with the project src and tests.

All 7 comments

This is specific to portable span (and not fast span).

To test/measure portable do you mean compile -framework=netfx?

We would need to test and measure to make sure there isn't significant regression for certain cases as part of the optimization for the common/general case.

Do you mean create e new benchmark on System.Memory.Performance.Tests using this guide?

I am working on it.

@AlexRadch maybe you can answer to my question, to test "portable" code do you use netfx switch?

test "portable" code do you use netfx switch?

That's what I do. More specifically, after doing a full build with -framework=netfx, then iterating with /p:TargetGroup=netfx with the project src and tests.

@stephentoub thank's!

More specifically, after doing a full build with -framework=netfx, then iterating with /p:TargetGroup=netfx with the project src and tests.

You can build and run the unit tests this way, but does the same apply to running performance tests?

I am working on it.

Assigning the issue.

Was this page helpful?
0 / 5 - 0 ratings