New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mscorlib] Moving more of the String functions to managed code #4703

Open
jamesqo opened this Issue May 1, 2016 · 2 comments

Comments

Projects
None yet
6 participants
@jamesqo
Contributor

jamesqo commented May 1, 2016

As it stands, many 'high-level' string functions like IndexOf, LastIndexOf, Replace etc. are implemented natively when they could be written in managed code. I noticed this was done with one of the string.Replace overloads in f007485, so maybe it would be good to do this to make the code more accessible to newcomers, if they aren't familiar with how the C++ code maps to C#.

@jamesqo jamesqo changed the title from Moving more of the String functions to managed code to [mscorlib] Moving more of the String functions to managed code May 1, 2016

@jkotas

This comment has been minimized.

Show comment
Hide comment
@jkotas

jkotas May 1, 2016

Member

We have looked into this in the past and moved everything that could be moved without significant perf loss. Moving more depends on having pretty good managed optimizations for all coreclr architectures.

This makes sense to consider only once RyuJIT or better codegen is available for all architectures that coreclr runs on (x86, x64, arm, arm64).

BTW: The managed implementations of all string methods are available in corert repo.

Member

jkotas commented May 1, 2016

We have looked into this in the past and moved everything that could be moved without significant perf loss. Moving more depends on having pretty good managed optimizations for all coreclr architectures.

This makes sense to consider only once RyuJIT or better codegen is available for all architectures that coreclr runs on (x86, x64, arm, arm64).

BTW: The managed implementations of all string methods are available in corert repo.

@jamesqo

This comment has been minimized.

Show comment
Hide comment
@jamesqo

jamesqo May 1, 2016

Contributor

@jkotas Ah, so that's why the implementations in the corert repo are managed; since it's compiled AOT and optimized by the C++ compiler, they get better codegen than the JIT implementation which is still a work-in-progress for some of the platforms you mention (arm, arm64). Thanks for clearing that up, makes sense now.

Contributor

jamesqo commented May 1, 2016

@jkotas Ah, so that's why the implementations in the corert repo are managed; since it's compiled AOT and optimized by the C++ compiler, they get better codegen than the JIT implementation which is still a work-in-progress for some of the platforms you mention (arm, arm64). Thanks for clearing that up, makes sense now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment