{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/73234137","id":73234137,"diff_hunk":"@@ -30,20 +30,23 @@ public static bool TryParse(Utf8String utf8Text, out ulong value, out int bytesC\n                         return true;\n                     }\n                 }\n-                try\n+                else if (value > UInt64.MaxValue / 10) // overflow\n                 {\n-                    ulong candidate = checked(value * 10 + nextByte - '0');\n-                    Debug.Assert(candidate >= value);\n-\n-                    value = candidate;\n-                    bytesConsumed++;\n+                    value = 0;\n+                    bytesConsumed = 0;\n+                    return false;\n                 }\n-                catch (OverflowException e)\n+                else if (UInt64.MaxValue - value * 10 < (ulong)(nextByte - '0')) // overflow\n                 {\n                     value = 0;\n                     bytesConsumed = 0;\n                     return false;\n                 }\n+                ulong candidate = checked(value * 10 + nextByte - '0');","path":"src/System.Text.Primitives/System/Text/InvariantParser_ulong.cs","position":23,"original_position":23,"commit_id":"3d55255d6bc9a14c5654d68c5ba6913370e35851","original_commit_id":"3d55255d6bc9a14c5654d68c5ba6913370e35851","user":{"login":"jonfortescue","id":13228069,"avatar_url":"https://avatars.githubusercontent.com/u/13228069?v=3","gravatar_id":"","url":"https://api.github.com/users/jonfortescue","html_url":"https://github.com/jonfortescue","followers_url":"https://api.github.com/users/jonfortescue/followers","following_url":"https://api.github.com/users/jonfortescue/following{/other_user}","gists_url":"https://api.github.com/users/jonfortescue/gists{/gist_id}","starred_url":"https://api.github.com/users/jonfortescue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonfortescue/subscriptions","organizations_url":"https://api.github.com/users/jonfortescue/orgs","repos_url":"https://api.github.com/users/jonfortescue/repos","events_url":"https://api.github.com/users/jonfortescue/events{/privacy}","received_events_url":"https://api.github.com/users/jonfortescue/received_events","type":"User","site_admin":false},"body":"Ah, good catch. We don't use the Utf8String class yet, so I hadn't made the change fully here.\r\n\r\nI removed the asserts from the signed classes because we want to allow overflow in the case of the min value; but I may add it back if it proves useful in some cases.","created_at":"2016-08-02T20:47:43Z","updated_at":"2016-08-02T20:47:43Z","html_url":"https://github.com/dotnet/corefxlab/pull/744#discussion_r73234137","pull_request_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/744","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/73234137"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/744#discussion_r73234137"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/744"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/744","id":79780680,"html_url":"https://github.com/dotnet/corefxlab/pull/744","diff_url":"https://github.com/dotnet/corefxlab/pull/744.diff","patch_url":"https://github.com/dotnet/corefxlab/pull/744.patch","issue_url":"https://api.github.com/repos/dotnet/corefxlab/issues/744","number":744,"state":"open","locked":false,"title":"Perf Improvement for InvariantParser","user":{"login":"jonfortescue","id":13228069,"avatar_url":"https://avatars.githubusercontent.com/u/13228069?v=3","gravatar_id":"","url":"https://api.github.com/users/jonfortescue","html_url":"https://github.com/jonfortescue","followers_url":"https://api.github.com/users/jonfortescue/followers","following_url":"https://api.github.com/users/jonfortescue/following{/other_user}","gists_url":"https://api.github.com/users/jonfortescue/gists{/gist_id}","starred_url":"https://api.github.com/users/jonfortescue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonfortescue/subscriptions","organizations_url":"https://api.github.com/users/jonfortescue/orgs","repos_url":"https://api.github.com/users/jonfortescue/repos","events_url":"https://api.github.com/users/jonfortescue/events{/privacy}","received_events_url":"https://api.github.com/users/jonfortescue/received_events","type":"User","site_admin":false},"body":"Significant perf gains by removing dependency on exception handling. Also added new tests to test edge cases.","created_at":"2016-08-02T18:03:17Z","updated_at":"2016-08-02T20:47:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4b2a3019f188a3e6b486f75bd90a6d73a2c5df0","assignee":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"assignees":[{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},{"login":"KrzysztofCwalina","id":9724236,"avatar_url":"https://avatars.githubusercontent.com/u/9724236?v=3","gravatar_id":"","url":"https://api.github.com/users/KrzysztofCwalina","html_url":"https://github.com/KrzysztofCwalina","followers_url":"https://api.github.com/users/KrzysztofCwalina/followers","following_url":"https://api.github.com/users/KrzysztofCwalina/following{/other_user}","gists_url":"https://api.github.com/users/KrzysztofCwalina/gists{/gist_id}","starred_url":"https://api.github.com/users/KrzysztofCwalina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrzysztofCwalina/subscriptions","organizations_url":"https://api.github.com/users/KrzysztofCwalina/orgs","repos_url":"https://api.github.com/users/KrzysztofCwalina/repos","events_url":"https://api.github.com/users/KrzysztofCwalina/events{/privacy}","received_events_url":"https://api.github.com/users/KrzysztofCwalina/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/744/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/744/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/issues/744/comments","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/3d55255d6bc9a14c5654d68c5ba6913370e35851","head":{"label":"jonfortescue:PerfTestImprovement","ref":"PerfTestImprovement","sha":"3d55255d6bc9a14c5654d68c5ba6913370e35851","user":{"login":"jonfortescue","id":13228069,"avatar_url":"https://avatars.githubusercontent.com/u/13228069?v=3","gravatar_id":"","url":"https://api.github.com/users/jonfortescue","html_url":"https://github.com/jonfortescue","followers_url":"https://api.github.com/users/jonfortescue/followers","following_url":"https://api.github.com/users/jonfortescue/following{/other_user}","gists_url":"https://api.github.com/users/jonfortescue/gists{/gist_id}","starred_url":"https://api.github.com/users/jonfortescue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonfortescue/subscriptions","organizations_url":"https://api.github.com/users/jonfortescue/orgs","repos_url":"https://api.github.com/users/jonfortescue/repos","events_url":"https://api.github.com/users/jonfortescue/events{/privacy}","received_events_url":"https://api.github.com/users/jonfortescue/received_events","type":"User","site_admin":false},"repo":{"id":61159583,"name":"corefxlab","full_name":"jonfortescue/corefxlab","owner":{"login":"jonfortescue","id":13228069,"avatar_url":"https://avatars.githubusercontent.com/u/13228069?v=3","gravatar_id":"","url":"https://api.github.com/users/jonfortescue","html_url":"https://github.com/jonfortescue","followers_url":"https://api.github.com/users/jonfortescue/followers","following_url":"https://api.github.com/users/jonfortescue/following{/other_user}","gists_url":"https://api.github.com/users/jonfortescue/gists{/gist_id}","starred_url":"https://api.github.com/users/jonfortescue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonfortescue/subscriptions","organizations_url":"https://api.github.com/users/jonfortescue/orgs","repos_url":"https://api.github.com/users/jonfortescue/repos","events_url":"https://api.github.com/users/jonfortescue/events{/privacy}","received_events_url":"https://api.github.com/users/jonfortescue/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonfortescue/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":true,"url":"https://api.github.com/repos/jonfortescue/corefxlab","forks_url":"https://api.github.com/repos/jonfortescue/corefxlab/forks","keys_url":"https://api.github.com/repos/jonfortescue/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonfortescue/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonfortescue/corefxlab/teams","hooks_url":"https://api.github.com/repos/jonfortescue/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/jonfortescue/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/jonfortescue/corefxlab/events","assignees_url":"https://api.github.com/repos/jonfortescue/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/jonfortescue/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/jonfortescue/corefxlab/tags","blobs_url":"https://api.github.com/repos/jonfortescue/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonfortescue/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonfortescue/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonfortescue/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonfortescue/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/jonfortescue/corefxlab/languages","stargazers_url":"https://api.github.com/repos/jonfortescue/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/jonfortescue/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/jonfortescue/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/jonfortescue/corefxlab/subscription","commits_url":"https://api.github.com/repos/jonfortescue/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonfortescue/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonfortescue/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonfortescue/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonfortescue/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/jonfortescue/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonfortescue/corefxlab/merges","archive_url":"https://api.github.com/repos/jonfortescue/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonfortescue/corefxlab/downloads","issues_url":"https://api.github.com/repos/jonfortescue/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/jonfortescue/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/jonfortescue/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/jonfortescue/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonfortescue/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/jonfortescue/corefxlab/releases{/id}","deployments_url":"https://api.github.com/repos/jonfortescue/corefxlab/deployments","created_at":"2016-06-14T22:21:11Z","updated_at":"2016-06-14T22:21:12Z","pushed_at":"2016-08-02T19:09:51Z","git_url":"git://github.com/jonfortescue/corefxlab.git","ssh_url":"git@github.com:jonfortescue/corefxlab.git","clone_url":"https://github.com/jonfortescue/corefxlab.git","svn_url":"https://github.com/jonfortescue/corefxlab","homepage":"","size":29144,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"c85278a06bff19b3e84fa65585ed5315f9338789","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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":29504192,"name":"corefxlab","full_name":"dotnet/corefxlab","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":false,"url":"https://api.github.com/repos/dotnet/corefxlab","forks_url":"https://api.github.com/repos/dotnet/corefxlab/forks","keys_url":"https://api.github.com/repos/dotnet/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefxlab/teams","hooks_url":"https://api.github.com/repos/dotnet/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefxlab/events","assignees_url":"https://api.github.com/repos/dotnet/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefxlab/tags","blobs_url":"https://api.github.com/repos/dotnet/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefxlab/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefxlab/subscription","commits_url":"https://api.github.com/repos/dotnet/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefxlab/merges","archive_url":"https://api.github.com/repos/dotnet/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefxlab/downloads","issues_url":"https://api.github.com/repos/dotnet/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefxlab/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corefxlab/deployments","created_at":"2015-01-20T00:44:35Z","updated_at":"2016-08-01T23:24:56Z","pushed_at":"2016-08-02T19:09:51Z","git_url":"git://github.com/dotnet/corefxlab.git","ssh_url":"git@github.com:dotnet/corefxlab.git","clone_url":"https://github.com/dotnet/corefxlab.git","svn_url":"https://github.com/dotnet/corefxlab","homepage":"","size":29709,"stargazers_count":318,"watchers_count":318,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":124,"mirror_url":null,"open_issues_count":122,"forks":124,"open_issues":122,"watchers":318,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/744"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/744"},"issue":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/744"},"comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/744/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/744/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/744/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefxlab/statuses/3d55255d6bc9a14c5654d68c5ba6913370e35851"}}}}
{"actor":{"display_login":"jonfortescue"}}