{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/177933563","pull_request_review_id":107902048,"id":177933563,"diff_hunk":"@@ -35,10 +35,7 @@ public bool Contains(char value, StringComparison comparisonType)\n         // Returns the index of the first occurrence of a specified character in the current instance.\n         // The search starts at startIndex and runs thorough the next count characters.\n         //\n-        public int IndexOf(char value)\n-        {\n-            return IndexOf(value, 0, this.Length);\n-        }\n+        public int IndexOf(char value) => SpanHelpers.IndexOf(ref _firstChar, value, Length);","path":"src/mscorlib/shared/System/String.Searching.cs","position":8,"original_position":8,"commit_id":"13c878500d63542624597fb9742836d87e4b08a1","original_commit_id":"13c878500d63542624597fb9742836d87e4b08a1","user":{"login":"ahsonkhan","id":6527137,"avatar_url":"https://avatars1.githubusercontent.com/u/6527137?v=4","gravatar_id":"","url":"https://api.github.com/users/ahsonkhan","html_url":"https://github.com/ahsonkhan","followers_url":"https://api.github.com/users/ahsonkhan/followers","following_url":"https://api.github.com/users/ahsonkhan/following{/other_user}","gists_url":"https://api.github.com/users/ahsonkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahsonkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahsonkhan/subscriptions","organizations_url":"https://api.github.com/users/ahsonkhan/orgs","repos_url":"https://api.github.com/users/ahsonkhan/repos","events_url":"https://api.github.com/users/ahsonkhan/events{/privacy}","received_events_url":"https://api.github.com/users/ahsonkhan/received_events","type":"User","site_admin":false},"body":"Yes, but I was planning to do it tomorrow. Hope that's fine.","created_at":"2018-03-29T01:29:36Z","updated_at":"2018-03-29T01:29:36Z","html_url":"https://github.com/dotnet/coreclr/pull/17284#discussion_r177933563","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/17284","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/177933563"},"html":{"href":"https://github.com/dotnet/coreclr/pull/17284#discussion_r177933563"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/17284"}},"in_reply_to_id":177933029},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/17284","id":177920910,"html_url":"https://github.com/dotnet/coreclr/pull/17284","diff_url":"https://github.com/dotnet/coreclr/pull/17284.diff","patch_url":"https://github.com/dotnet/coreclr/pull/17284.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/17284","number":17284,"state":"closed","locked":false,"title":"Use ROSpan.IndexOf as the workhorse for string.IndexOf","user":{"login":"ahsonkhan","id":6527137,"avatar_url":"https://avatars1.githubusercontent.com/u/6527137?v=4","gravatar_id":"","url":"https://api.github.com/users/ahsonkhan","html_url":"https://github.com/ahsonkhan","followers_url":"https://api.github.com/users/ahsonkhan/followers","following_url":"https://api.github.com/users/ahsonkhan/following{/other_user}","gists_url":"https://api.github.com/users/ahsonkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahsonkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahsonkhan/subscriptions","organizations_url":"https://api.github.com/users/ahsonkhan/orgs","repos_url":"https://api.github.com/users/ahsonkhan/repos","events_url":"https://api.github.com/users/ahsonkhan/events{/privacy}","received_events_url":"https://api.github.com/users/ahsonkhan/received_events","type":"User","site_admin":false},"body":"~**Do we want to make such changes for this and other string APIs to avoid code duplication?**~\r\n\r\n~The concern is, for small strings, the overhead of casting to a span causes performance regression.~\r\n\r\nThe performance should be identical now.\r\n\r\n<summary>Version 1 of the PR\r\n<details>\r\n**Before modifying Span.IndexOf:**\r\n![image](https://user-images.githubusercontent.com/6527137/38005276-f06ea496-31f4-11e8-9cba-2e9bbe32d159.png)\r\n\r\n**After modifying Span.IndexOf (to follow the implementation of string.IndexOf, using fixed):**\r\n![image](https://user-images.githubusercontent.com/6527137/38007084-8aa75006-31fc-11e8-9bed-5cdf7fb209cf.png)\r\n</details>\r\n</summary>\r\n\r\ncc @jkotas, @tarekgh, @eerhardt ","created_at":"2018-03-28T03:30:52Z","updated_at":"2018-03-29T01:29:36Z","closed_at":"2018-03-28T23:33:56Z","merged_at":"2018-03-28T23:33:56Z","merge_commit_sha":"30a49486711b012154c045ad02b3c0338b53192b","assignee":{"login":"ahsonkhan","id":6527137,"avatar_url":"https://avatars1.githubusercontent.com/u/6527137?v=4","gravatar_id":"","url":"https://api.github.com/users/ahsonkhan","html_url":"https://github.com/ahsonkhan","followers_url":"https://api.github.com/users/ahsonkhan/followers","following_url":"https://api.github.com/users/ahsonkhan/following{/other_user}","gists_url":"https://api.github.com/users/ahsonkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahsonkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahsonkhan/subscriptions","organizations_url":"https://api.github.com/users/ahsonkhan/orgs","repos_url":"https://api.github.com/users/ahsonkhan/repos","events_url":"https://api.github.com/users/ahsonkhan/events{/privacy}","received_events_url":"https://api.github.com/users/ahsonkhan/received_events","type":"User","site_admin":false},"assignees":[{"login":"ahsonkhan","id":6527137,"avatar_url":"https://avatars1.githubusercontent.com/u/6527137?v=4","gravatar_id":"","url":"https://api.github.com/users/ahsonkhan","html_url":"https://github.com/ahsonkhan","followers_url":"https://api.github.com/users/ahsonkhan/followers","following_url":"https://api.github.com/users/ahsonkhan/following{/other_user}","gists_url":"https://api.github.com/users/ahsonkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahsonkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahsonkhan/subscriptions","organizations_url":"https://api.github.com/users/ahsonkhan/orgs","repos_url":"https://api.github.com/users/ahsonkhan/repos","events_url":"https://api.github.com/users/ahsonkhan/events{/privacy}","received_events_url":"https://api.github.com/users/ahsonkhan/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":517089971,"url":"https://api.github.com/repos/dotnet/coreclr/labels/area-System.Runtime","name":"area-System.Runtime","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/17284/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/17284/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/17284/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/13c878500d63542624597fb9742836d87e4b08a1","head":{"label":"ahsonkhan:UseSpanIndexOf","ref":"UseSpanIndexOf","sha":"13c878500d63542624597fb9742836d87e4b08a1","user":{"login":"ahsonkhan","id":6527137,"avatar_url":"https://avatars1.githubusercontent.com/u/6527137?v=4","gravatar_id":"","url":"https://api.github.com/users/ahsonkhan","html_url":"https://github.com/ahsonkhan","followers_url":"https://api.github.com/users/ahsonkhan/followers","following_url":"https://api.github.com/users/ahsonkhan/following{/other_user}","gists_url":"https://api.github.com/users/ahsonkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahsonkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahsonkhan/subscriptions","organizations_url":"https://api.github.com/users/ahsonkhan/orgs","repos_url":"https://api.github.com/users/ahsonkhan/repos","events_url":"https://api.github.com/users/ahsonkhan/events{/privacy}","received_events_url":"https://api.github.com/users/ahsonkhan/received_events","type":"User","site_admin":false},"repo":{"id":75873049,"name":"coreclr","full_name":"ahsonkhan/coreclr","owner":{"login":"ahsonkhan","id":6527137,"avatar_url":"https://avatars1.githubusercontent.com/u/6527137?v=4","gravatar_id":"","url":"https://api.github.com/users/ahsonkhan","html_url":"https://github.com/ahsonkhan","followers_url":"https://api.github.com/users/ahsonkhan/followers","following_url":"https://api.github.com/users/ahsonkhan/following{/other_user}","gists_url":"https://api.github.com/users/ahsonkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahsonkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahsonkhan/subscriptions","organizations_url":"https://api.github.com/users/ahsonkhan/orgs","repos_url":"https://api.github.com/users/ahsonkhan/repos","events_url":"https://api.github.com/users/ahsonkhan/events{/privacy}","received_events_url":"https://api.github.com/users/ahsonkhan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ahsonkhan/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":true,"url":"https://api.github.com/repos/ahsonkhan/coreclr","forks_url":"https://api.github.com/repos/ahsonkhan/coreclr/forks","keys_url":"https://api.github.com/repos/ahsonkhan/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ahsonkhan/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ahsonkhan/coreclr/teams","hooks_url":"https://api.github.com/repos/ahsonkhan/coreclr/hooks","issue_events_url":"https://api.github.com/repos/ahsonkhan/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/ahsonkhan/coreclr/events","assignees_url":"https://api.github.com/repos/ahsonkhan/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/ahsonkhan/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/ahsonkhan/coreclr/tags","blobs_url":"https://api.github.com/repos/ahsonkhan/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ahsonkhan/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ahsonkhan/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/ahsonkhan/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ahsonkhan/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/ahsonkhan/coreclr/languages","stargazers_url":"https://api.github.com/repos/ahsonkhan/coreclr/stargazers","contributors_url":"https://api.github.com/repos/ahsonkhan/coreclr/contributors","subscribers_url":"https://api.github.com/repos/ahsonkhan/coreclr/subscribers","subscription_url":"https://api.github.com/repos/ahsonkhan/coreclr/subscription","commits_url":"https://api.github.com/repos/ahsonkhan/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/ahsonkhan/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/ahsonkhan/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/ahsonkhan/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/ahsonkhan/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/ahsonkhan/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ahsonkhan/coreclr/merges","archive_url":"https://api.github.com/repos/ahsonkhan/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ahsonkhan/coreclr/downloads","issues_url":"https://api.github.com/repos/ahsonkhan/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/ahsonkhan/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/ahsonkhan/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/ahsonkhan/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ahsonkhan/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/ahsonkhan/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/ahsonkhan/coreclr/deployments","created_at":"2016-12-07T20:28:47Z","updated_at":"2018-03-28T22:28:11Z","pushed_at":"2018-03-28T23:34:01Z","git_url":"git://github.com/ahsonkhan/coreclr.git","ssh_url":"git@github.com:ahsonkhan/coreclr.git","clone_url":"https://github.com/ahsonkhan/coreclr.git","svn_url":"https://github.com/ahsonkhan/coreclr","homepage":"https://docs.microsoft.com/dotnet/","size":213501,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"27a710b82880f67e8fe1bf29babee9243c7c9c2e","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30092893,"name":"coreclr","full_name":"dotnet/coreclr","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called System.Private.Corelib (or mscorlib). It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes. We welcome contributions.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/coreclr/deployments","created_at":"2015-01-30T22:10:02Z","updated_at":"2018-03-29T00:40:24Z","pushed_at":"2018-03-29T01:21:54Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"https://github.com/dotnet/core","size":215064,"stargazers_count":9120,"watchers_count":9120,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2291,"mirror_url":null,"archived":false,"open_issues_count":1574,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2291,"open_issues":1574,"watchers":9120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/17284"},"html":{"href":"https://github.com/dotnet/coreclr/pull/17284"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/17284"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/17284/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/17284/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/17284/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/13c878500d63542624597fb9742836d87e4b08a1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ahsonkhan"}}