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

Port CompareOrdinalHelper performance optimizations from CoreCLR - #1551

Merged
jkotas merged 1 commit into
dotnet:masterfrom
jamesqo:port-compare-perf
Jul 20, 2016
Merged

jkotas merged 1 commit into
dotnet:masterfrom
jamesqo:port-compare-perf

Conversation

@jamesqo

@jamesqo jamesqo commented Jul 20, 2016

Copy link
Copy Markdown
Contributor

This ports the changes made in dotnet/coreclr#6119 to CoreRT, including all of the comments. (References to m_firstChar have been changed to _firstChar, the note about alignment now mentions an EE type pointer instead of a method table pointer, reference to "the JIT inlining the method" has been removed.)

For some reason it looks like the short-circuiting optimization if _firstChars were different was not present here, so I added that to the callers since CompareOrdinalHelper depends on it.

cc @jkotas

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let me know if there are any inconsistencies in this comment block; I'm assuming the CoreRT string layout is mostly the same as the one in CoreCLR.

@jkotas

jkotas commented Jul 20, 2016

Copy link
Copy Markdown
Member

Thanks!

@jkotas
jkotas merged commit 0989b47 into dotnet:master Jul 20, 2016
@jamesqo
jamesqo deleted the port-compare-perf branch July 20, 2016 12:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants