{"action":"opened","number":13,"pull_request":{"url":"https://api.github.com/repos/wahern/timeout/pulls/13","id":61820450,"html_url":"https://github.com/wahern/timeout/pull/13","diff_url":"https://github.com/wahern/timeout/pull/13.diff","patch_url":"https://github.com/wahern/timeout/pull/13.patch","issue_url":"https://api.github.com/repos/wahern/timeout/issues/13","number":13,"state":"open","locked":false,"title":"Use a faster safe bitwise rotate implementation.","user":{"login":"nmathewson","id":162054,"avatar_url":"https://avatars.githubusercontent.com/u/162054?v=3","gravatar_id":"","url":"https://api.github.com/users/nmathewson","html_url":"https://github.com/nmathewson","followers_url":"https://api.github.com/users/nmathewson/followers","following_url":"https://api.github.com/users/nmathewson/following{/other_user}","gists_url":"https://api.github.com/users/nmathewson/gists{/gist_id}","starred_url":"https://api.github.com/users/nmathewson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmathewson/subscriptions","organizations_url":"https://api.github.com/users/nmathewson/orgs","repos_url":"https://api.github.com/users/nmathewson/repos","events_url":"https://api.github.com/users/nmathewson/events{/privacy}","received_events_url":"https://api.github.com/users/nmathewson/received_events","type":"User","site_admin":false},"body":"This branch replaces the rotation operation with one that compiles down to a single branchless rotate instruction (on my gcc and clang compilers).  The magic trick here is the fact that :\r\n\r\n      (v >> (c&mask)) | (v << (-c&mask))\r\n\r\nworks even when c==0, is conformant c, doesn't require a branch, and many compilers can recognize it and replace it with a rotate instruction.\r\n\r\nI have tested this, but I haven't benchmarked it yet or tested with super-old or super-weird compilers.  I would assume that eliminating these branch instructions is always a good idea, though, and it doesn't make the timeout.c code uglier.","created_at":"2016-03-05T18:52:52Z","updated_at":"2016-03-05T18:52:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wahern/timeout/pulls/13/commits","review_comments_url":"https://api.github.com/repos/wahern/timeout/pulls/13/comments","review_comment_url":"https://api.github.com/repos/wahern/timeout/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wahern/timeout/issues/13/comments","statuses_url":"https://api.github.com/repos/wahern/timeout/statuses/b51a3aaa30899dd6f70bc3269aaa9acb4c6befbf","head":{"label":"nmathewson:faster_rotate","ref":"faster_rotate","sha":"b51a3aaa30899dd6f70bc3269aaa9acb4c6befbf","user":{"login":"nmathewson","id":162054,"avatar_url":"https://avatars.githubusercontent.com/u/162054?v=3","gravatar_id":"","url":"https://api.github.com/users/nmathewson","html_url":"https://github.com/nmathewson","followers_url":"https://api.github.com/users/nmathewson/followers","following_url":"https://api.github.com/users/nmathewson/following{/other_user}","gists_url":"https://api.github.com/users/nmathewson/gists{/gist_id}","starred_url":"https://api.github.com/users/nmathewson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmathewson/subscriptions","organizations_url":"https://api.github.com/users/nmathewson/orgs","repos_url":"https://api.github.com/users/nmathewson/repos","events_url":"https://api.github.com/users/nmathewson/events{/privacy}","received_events_url":"https://api.github.com/users/nmathewson/received_events","type":"User","site_admin":false},"repo":{"id":52106478,"name":"timeout","full_name":"nmathewson/timeout","owner":{"login":"nmathewson","id":162054,"avatar_url":"https://avatars.githubusercontent.com/u/162054?v=3","gravatar_id":"","url":"https://api.github.com/users/nmathewson","html_url":"https://github.com/nmathewson","followers_url":"https://api.github.com/users/nmathewson/followers","following_url":"https://api.github.com/users/nmathewson/following{/other_user}","gists_url":"https://api.github.com/users/nmathewson/gists{/gist_id}","starred_url":"https://api.github.com/users/nmathewson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmathewson/subscriptions","organizations_url":"https://api.github.com/users/nmathewson/orgs","repos_url":"https://api.github.com/users/nmathewson/repos","events_url":"https://api.github.com/users/nmathewson/events{/privacy}","received_events_url":"https://api.github.com/users/nmathewson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nmathewson/timeout","description":"timer.c: Tickless hierarchical timing wheel","fork":true,"url":"https://api.github.com/repos/nmathewson/timeout","forks_url":"https://api.github.com/repos/nmathewson/timeout/forks","keys_url":"https://api.github.com/repos/nmathewson/timeout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nmathewson/timeout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nmathewson/timeout/teams","hooks_url":"https://api.github.com/repos/nmathewson/timeout/hooks","issue_events_url":"https://api.github.com/repos/nmathewson/timeout/issues/events{/number}","events_url":"https://api.github.com/repos/nmathewson/timeout/events","assignees_url":"https://api.github.com/repos/nmathewson/timeout/assignees{/user}","branches_url":"https://api.github.com/repos/nmathewson/timeout/branches{/branch}","tags_url":"https://api.github.com/repos/nmathewson/timeout/tags","blobs_url":"https://api.github.com/repos/nmathewson/timeout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nmathewson/timeout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nmathewson/timeout/git/refs{/sha}","trees_url":"https://api.github.com/repos/nmathewson/timeout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nmathewson/timeout/statuses/{sha}","languages_url":"https://api.github.com/repos/nmathewson/timeout/languages","stargazers_url":"https://api.github.com/repos/nmathewson/timeout/stargazers","contributors_url":"https://api.github.com/repos/nmathewson/timeout/contributors","subscribers_url":"https://api.github.com/repos/nmathewson/timeout/subscribers","subscription_url":"https://api.github.com/repos/nmathewson/timeout/subscription","commits_url":"https://api.github.com/repos/nmathewson/timeout/commits{/sha}","git_commits_url":"https://api.github.com/repos/nmathewson/timeout/git/commits{/sha}","comments_url":"https://api.github.com/repos/nmathewson/timeout/comments{/number}","issue_comment_url":"https://api.github.com/repos/nmathewson/timeout/issues/comments{/number}","contents_url":"https://api.github.com/repos/nmathewson/timeout/contents/{+path}","compare_url":"https://api.github.com/repos/nmathewson/timeout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nmathewson/timeout/merges","archive_url":"https://api.github.com/repos/nmathewson/timeout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nmathewson/timeout/downloads","issues_url":"https://api.github.com/repos/nmathewson/timeout/issues{/number}","pulls_url":"https://api.github.com/repos/nmathewson/timeout/pulls{/number}","milestones_url":"https://api.github.com/repos/nmathewson/timeout/milestones{/number}","notifications_url":"https://api.github.com/repos/nmathewson/timeout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nmathewson/timeout/labels{/name}","releases_url":"https://api.github.com/repos/nmathewson/timeout/releases{/id}","deployments_url":"https://api.github.com/repos/nmathewson/timeout/deployments","created_at":"2016-02-19T18:05:36Z","updated_at":"2016-02-19T18:05:37Z","pushed_at":"2016-03-05T18:47:20Z","git_url":"git://github.com/nmathewson/timeout.git","ssh_url":"git@github.com:nmathewson/timeout.git","clone_url":"https://github.com/nmathewson/timeout.git","svn_url":"https://github.com/nmathewson/timeout","homepage":"http://25thandclement.com/~william/projects/timeout.c.html","size":104,"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":"wahern:master","ref":"master","sha":"e5a9e8bfaa9c631bdc54002181795931b65bdc1a","user":{"login":"wahern","id":6007976,"avatar_url":"https://avatars.githubusercontent.com/u/6007976?v=3","gravatar_id":"","url":"https://api.github.com/users/wahern","html_url":"https://github.com/wahern","followers_url":"https://api.github.com/users/wahern/followers","following_url":"https://api.github.com/users/wahern/following{/other_user}","gists_url":"https://api.github.com/users/wahern/gists{/gist_id}","starred_url":"https://api.github.com/users/wahern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wahern/subscriptions","organizations_url":"https://api.github.com/users/wahern/orgs","repos_url":"https://api.github.com/users/wahern/repos","events_url":"https://api.github.com/users/wahern/events{/privacy}","received_events_url":"https://api.github.com/users/wahern/received_events","type":"User","site_admin":false},"repo":{"id":15096559,"name":"timeout","full_name":"wahern/timeout","owner":{"login":"wahern","id":6007976,"avatar_url":"https://avatars.githubusercontent.com/u/6007976?v=3","gravatar_id":"","url":"https://api.github.com/users/wahern","html_url":"https://github.com/wahern","followers_url":"https://api.github.com/users/wahern/followers","following_url":"https://api.github.com/users/wahern/following{/other_user}","gists_url":"https://api.github.com/users/wahern/gists{/gist_id}","starred_url":"https://api.github.com/users/wahern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wahern/subscriptions","organizations_url":"https://api.github.com/users/wahern/orgs","repos_url":"https://api.github.com/users/wahern/repos","events_url":"https://api.github.com/users/wahern/events{/privacy}","received_events_url":"https://api.github.com/users/wahern/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wahern/timeout","description":"timer.c: Tickless hierarchical timing wheel","fork":false,"url":"https://api.github.com/repos/wahern/timeout","forks_url":"https://api.github.com/repos/wahern/timeout/forks","keys_url":"https://api.github.com/repos/wahern/timeout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wahern/timeout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wahern/timeout/teams","hooks_url":"https://api.github.com/repos/wahern/timeout/hooks","issue_events_url":"https://api.github.com/repos/wahern/timeout/issues/events{/number}","events_url":"https://api.github.com/repos/wahern/timeout/events","assignees_url":"https://api.github.com/repos/wahern/timeout/assignees{/user}","branches_url":"https://api.github.com/repos/wahern/timeout/branches{/branch}","tags_url":"https://api.github.com/repos/wahern/timeout/tags","blobs_url":"https://api.github.com/repos/wahern/timeout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wahern/timeout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wahern/timeout/git/refs{/sha}","trees_url":"https://api.github.com/repos/wahern/timeout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wahern/timeout/statuses/{sha}","languages_url":"https://api.github.com/repos/wahern/timeout/languages","stargazers_url":"https://api.github.com/repos/wahern/timeout/stargazers","contributors_url":"https://api.github.com/repos/wahern/timeout/contributors","subscribers_url":"https://api.github.com/repos/wahern/timeout/subscribers","subscription_url":"https://api.github.com/repos/wahern/timeout/subscription","commits_url":"https://api.github.com/repos/wahern/timeout/commits{/sha}","git_commits_url":"https://api.github.com/repos/wahern/timeout/git/commits{/sha}","comments_url":"https://api.github.com/repos/wahern/timeout/comments{/number}","issue_comment_url":"https://api.github.com/repos/wahern/timeout/issues/comments{/number}","contents_url":"https://api.github.com/repos/wahern/timeout/contents/{+path}","compare_url":"https://api.github.com/repos/wahern/timeout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wahern/timeout/merges","archive_url":"https://api.github.com/repos/wahern/timeout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wahern/timeout/downloads","issues_url":"https://api.github.com/repos/wahern/timeout/issues{/number}","pulls_url":"https://api.github.com/repos/wahern/timeout/pulls{/number}","milestones_url":"https://api.github.com/repos/wahern/timeout/milestones{/number}","notifications_url":"https://api.github.com/repos/wahern/timeout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wahern/timeout/labels{/name}","releases_url":"https://api.github.com/repos/wahern/timeout/releases{/id}","deployments_url":"https://api.github.com/repos/wahern/timeout/deployments","created_at":"2013-12-11T03:02:40Z","updated_at":"2016-03-04T14:56:55Z","pushed_at":"2016-02-27T06:24:14Z","git_url":"git://github.com/wahern/timeout.git","ssh_url":"git@github.com:wahern/timeout.git","clone_url":"https://github.com/wahern/timeout.git","svn_url":"https://github.com/wahern/timeout","homepage":"http://25thandclement.com/~william/projects/timeout.c.html","size":101,"stargazers_count":31,"watchers_count":31,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":3,"forks":11,"open_issues":3,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wahern/timeout/pulls/13"},"html":{"href":"https://github.com/wahern/timeout/pull/13"},"issue":{"href":"https://api.github.com/repos/wahern/timeout/issues/13"},"comments":{"href":"https://api.github.com/repos/wahern/timeout/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/wahern/timeout/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/wahern/timeout/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wahern/timeout/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/wahern/timeout/statuses/b51a3aaa30899dd6f70bc3269aaa9acb4c6befbf"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":146,"deletions":17,"changed_files":2}}