Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Faster StartsWithSegments Ordinal check #521

Closed
wants to merge 1 commit into from

Conversation

benaadams
Copy link
Contributor

Framework's call to native comes with a cost

Before
string-startswith-before

After
string-startswith-after

@benaadams
Copy link
Contributor Author

As an aside; the sets and whatnot have high costs as they are also doing dictionary lookups; typecasts and initalizing the feature cache

@halter73
Copy link
Member

:shipit:

Do you have any thoughts @Tratcher?

@davidfowl
Copy link
Member

Not a fan of this. Looks pretty unmaintainable. Is it really worth it? Can we make a change like this in corefx instead?

@benaadams
Copy link
Contributor Author

@halter73
Copy link
Member

@davidfowl No less maintainable than GetAsciiString 😛

I see your point though. This is something probably done once per request at most, and I doubt most apps are even going to specify StringComparison.Ordinal.

@halter73 halter73 closed this Dec 30, 2015
@benaadams
Copy link
Contributor Author

@halter73 The crazy is currently localized to one project :)

@benaadams
Copy link
Contributor Author

Raised PR in coreclr dotnet/coreclr#2667

@benaadams benaadams deleted the pathstring-perf branch May 10, 2016 11:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants