-
Notifications
You must be signed in to change notification settings - Fork 279
Add Perf_String_Substring_* benchmarks #2178
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
Conversation
@@ -76,6 +76,7 @@ public string Remove_IntInt(string s, int i1, int i2) | |||
[Arguments("dzsdzsDDZSDZSDZSddsz", 0)] | |||
[Arguments("dzsdzsDDZSDZSDZSddsz", 7)] | |||
[Arguments("dzsdzsDDZSDZSDZSddsz", 10)] | |||
[Arguments("dzsdzsDDZSDZSDZSddsz", 19)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably will delete this change, so ignore it
// public void Substring_Full() => "abc".Substring(0, 3); | ||
|
||
// [Benchmark] | ||
// public void Substring_Empty() => "abc".Substring(0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure these are of any interest but they showed that with the new changes the JIT can fully compile away substring code compared to before
build errors
|
Not sure why those build failures don't show up when I build locally. There should be something like this suppressing them though. |
Suppressed the warning in the places this was missing. See PR. Then getting assets issue:
so switched to |
Reported some results in dotnet/runtime#62577 (comment) |
@nietras checking in on this one, do you believe it's ready to review (after resolving conflicts)? |
a668e00
to
6e1617c
Compare
@nietras I'm closing this one as it seems that string.Substring(int) and string.Substring(int, int) are already covered very similarly. Please let me know if that's not the case. |
Draft benchmarks for Substring. cc @adamsitnik feel free to make any changes you like right away. For some reason I can no longer built this after updating latest main. In relation to dotnet/runtime#62577