{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/20304","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/20304/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/20304/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/20304/events","html_url":"https://github.com/dotnet/coreclr/pull/20304","id":367929164,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMjI0Nzcy","number":20304,"title":"Improve performance of String.ToUpper and friends","user":{"login":"GrabYourPitchforks","id":1746272,"node_id":"MDQ6VXNlcjE3NDYyNzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1746272?v=4","gravatar_id":"","url":"https://api.github.com/users/GrabYourPitchforks","html_url":"https://github.com/GrabYourPitchforks","followers_url":"https://api.github.com/users/GrabYourPitchforks/followers","following_url":"https://api.github.com/users/GrabYourPitchforks/following{/other_user}","gists_url":"https://api.github.com/users/GrabYourPitchforks/gists{/gist_id}","starred_url":"https://api.github.com/users/GrabYourPitchforks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrabYourPitchforks/subscriptions","organizations_url":"https://api.github.com/users/GrabYourPitchforks/orgs","repos_url":"https://api.github.com/users/GrabYourPitchforks/repos","events_url":"https://api.github.com/users/GrabYourPitchforks/events{/privacy}","received_events_url":"https://api.github.com/users/GrabYourPitchforks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-08T19:49:53Z","updated_at":"2018-10-08T21:07:39Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/20304","html_url":"https://github.com/dotnet/coreclr/pull/20304","diff_url":"https://github.com/dotnet/coreclr/pull/20304.diff","patch_url":"https://github.com/dotnet/coreclr/pull/20304.patch"},"body":"This improves the performance of `String.ToUpper` / `ToUpperInvariant` / `ToLower` / `ToLowerInvariant`. This is a follow-up to https://github.com/dotnet/coreclr/pull/20275, which improved the performance of the corresponding `ReadOnlySpan<char>`-based extension methods.\r\n\r\n```cs\r\n[Benchmark]\r\n[Arguments(\"\")] // returns String.Empty (non-allocating)\r\n[Arguments(\"ASCII\")] // returns input argument (non-allocating)\r\n[Arguments(\"MUCH LONGER ASCII MUCH LONGER ASCII\")] // returns input argument (non-allocating)\r\n[Arguments(\"This is a mix of UPPER and lower ASCII.\")] // allocates\r\n[Arguments(\"Транскрипто́мные техноло́гии\")] // from ru.wikipedia.org front page, allocates, uses p/invoke\r\npublic string ToUpperInvariant(string argument)\r\n{\r\n    return argument.ToUpperInvariant();\r\n}\r\n```\r\n\r\n|           Method |               Toolchain |             argument |       Mean |     Error |    StdDev | Scaled | ScaledSD |\r\n|----------------- |------------------------ |--------------------- |-----------:|----------:|----------:|-------:|---------:|\r\n| **ToUpperInvariant** | **3.0.0-preview1-27004-04** |                     (empty) |  **13.146 ns** | **0.8383 ns** | **0.8234 ns** |   **1.00** |     **0.00** |\r\n| ToUpperInvariant |                   local |                      |   5.509 ns | 0.1373 ns | 0.1217 ns |   0.42 |     0.03 |\r\n|                  |                         |                      |            |           |           |        |          |\r\n| **ToUpperInvariant** | **3.0.0-preview1-27004-04** |                **ASCII** |  **20.057 ns** | **0.2416 ns** | **0.2142 ns** |   **1.00** |     **0.00** |\r\n| ToUpperInvariant |                   local |                ASCII |   7.955 ns | 0.0687 ns | 0.0643 ns |   0.40 |     0.01 |\r\n|                  |                         |                      |            |           |           |        |          |\r\n| **ToUpperInvariant** | **3.0.0-preview1-27004-04** | **MUCH (...)ASCII [35]** |  **41.229 ns** | **0.5436 ns** | **0.4819 ns** |   **1.00** |     **0.00** |\r\n| ToUpperInvariant |                   local | MUCH (...)ASCII [35] |  22.423 ns | 0.1994 ns | 0.1865 ns |   0.54 |     0.01 |\r\n|                  |                         |                      |            |           |           |        |          |\r\n| **ToUpperInvariant** | **3.0.0-preview1-27004-04** | **This (...)SCII. [39]** |  **97.540 ns** | **1.1472 ns** | **1.0731 ns** |   **1.00** |     **0.00** |\r\n| ToUpperInvariant |                   local | This (...)SCII. [39] |  43.030 ns | 0.9679 ns | 1.5352 ns |   0.44 |     0.02 |\r\n|                  |                         |                      |            |           |           |        |          |\r\n| **ToUpperInvariant** | **3.0.0-preview1-27004-04** | **Транс(...)о́гии [28]** | **101.937 ns** | **1.3241 ns** | **1.1057 ns** |   **1.00** |     **0.00** |\r\n| ToUpperInvariant |                   local | Транс(...)о́гии [28] |  92.030 ns | 1.0237 ns | 0.9075 ns |   0.90 |     0.01 |\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/427979526","html_url":"https://github.com/dotnet/coreclr/pull/20304#issuecomment-427979526","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/20304","id":427979526,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzk3OTUyNg==","user":{"login":"GrabYourPitchforks","id":1746272,"node_id":"MDQ6VXNlcjE3NDYyNzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1746272?v=4","gravatar_id":"","url":"https://api.github.com/users/GrabYourPitchforks","html_url":"https://github.com/GrabYourPitchforks","followers_url":"https://api.github.com/users/GrabYourPitchforks/followers","following_url":"https://api.github.com/users/GrabYourPitchforks/following{/other_user}","gists_url":"https://api.github.com/users/GrabYourPitchforks/gists{/gist_id}","starred_url":"https://api.github.com/users/GrabYourPitchforks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrabYourPitchforks/subscriptions","organizations_url":"https://api.github.com/users/GrabYourPitchforks/orgs","repos_url":"https://api.github.com/users/GrabYourPitchforks/repos","events_url":"https://api.github.com/users/GrabYourPitchforks/events{/privacy}","received_events_url":"https://api.github.com/users/GrabYourPitchforks/received_events","type":"User","site_admin":false},"created_at":"2018-10-08T21:07:39Z","updated_at":"2018-10-08T21:07:39Z","author_association":"MEMBER","body":"@dotnet-bot test Windows_NT x64 Release CoreFX Tests"}}
{"actor":{"display_login":"GrabYourPitchforks"}}