{"action":"opened","number":156,"pull_request":{"url":"https://api.github.com/repos/jmoiron/sqlx/pulls/156","id":41605868,"html_url":"https://github.com/jmoiron/sqlx/pull/156","diff_url":"https://github.com/jmoiron/sqlx/pull/156.diff","patch_url":"https://github.com/jmoiron/sqlx/pull/156.patch","issue_url":"https://api.github.com/repos/jmoiron/sqlx/issues/156","number":156,"state":"open","locked":false,"title":"Refactor and optimize 'In'. Add benchmark.","user":{"login":"nuss-justin","id":6443781,"avatar_url":"https://avatars.githubusercontent.com/u/6443781?v=3","gravatar_id":"","url":"https://api.github.com/users/nuss-justin","html_url":"https://github.com/nuss-justin","followers_url":"https://api.github.com/users/nuss-justin/followers","following_url":"https://api.github.com/users/nuss-justin/following{/other_user}","gists_url":"https://api.github.com/users/nuss-justin/gists{/gist_id}","starred_url":"https://api.github.com/users/nuss-justin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuss-justin/subscriptions","organizations_url":"https://api.github.com/users/nuss-justin/orgs","repos_url":"https://api.github.com/users/nuss-justin/repos","events_url":"https://api.github.com/users/nuss-justin/events{/privacy}","received_events_url":"https://api.github.com/users/nuss-justin/received_events","type":"User","site_admin":false},"body":"Avoid some allocations by using precomputing the number of expanded argument.\nAlso use strings.IndexByte for faster searching of '?' characters and reduce\nwrites to the buffer.\n\nAdd a benchmark for calling 'In'.\n\nImprovements on current go stable (1.4.2, linux/amd64):\n\n```\nbenchmark       old ns/op     new ns/op     delta\nBenchmarkIn     5913          4608          -22.07%\n\nbenchmark       old allocs     new allocs     delta\nBenchmarkIn     32             25             -21.88%\n\nbenchmark       old bytes     new bytes     delta\nBenchmarkIn     941           780           -17.11%\n```\n\nSame benchmark on tip (devel +bc5a6ce, linux/amd64):\n\n```\nbenchmark       old ns/op     new ns/op     delta\nBenchmarkIn     9461          7196          -23.94%\n\nbenchmark       old allocs     new allocs     delta\nBenchmarkIn     28             25             -10.71%\n\nbenchmark       old bytes     new bytes     delta\nBenchmarkIn     976           848           -13.11%\n```","created_at":"2015-08-04T19:10:25Z","updated_at":"2015-08-04T19:10:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"564e14f7cdc0220b54bc86e643221be2cd6ae52a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jmoiron/sqlx/pulls/156/commits","review_comments_url":"https://api.github.com/repos/jmoiron/sqlx/pulls/156/comments","review_comment_url":"https://api.github.com/repos/jmoiron/sqlx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jmoiron/sqlx/issues/156/comments","statuses_url":"https://api.github.com/repos/jmoiron/sqlx/statuses/740016868829e4a0dd418d82d900db43c1edd8e6","head":{"label":"nuss-justin:master","ref":"master","sha":"740016868829e4a0dd418d82d900db43c1edd8e6","user":{"login":"nuss-justin","id":6443781,"avatar_url":"https://avatars.githubusercontent.com/u/6443781?v=3","gravatar_id":"","url":"https://api.github.com/users/nuss-justin","html_url":"https://github.com/nuss-justin","followers_url":"https://api.github.com/users/nuss-justin/followers","following_url":"https://api.github.com/users/nuss-justin/following{/other_user}","gists_url":"https://api.github.com/users/nuss-justin/gists{/gist_id}","starred_url":"https://api.github.com/users/nuss-justin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuss-justin/subscriptions","organizations_url":"https://api.github.com/users/nuss-justin/orgs","repos_url":"https://api.github.com/users/nuss-justin/repos","events_url":"https://api.github.com/users/nuss-justin/events{/privacy}","received_events_url":"https://api.github.com/users/nuss-justin/received_events","type":"User","site_admin":false},"repo":{"id":40203578,"name":"sqlx","full_name":"nuss-justin/sqlx","owner":{"login":"nuss-justin","id":6443781,"avatar_url":"https://avatars.githubusercontent.com/u/6443781?v=3","gravatar_id":"","url":"https://api.github.com/users/nuss-justin","html_url":"https://github.com/nuss-justin","followers_url":"https://api.github.com/users/nuss-justin/followers","following_url":"https://api.github.com/users/nuss-justin/following{/other_user}","gists_url":"https://api.github.com/users/nuss-justin/gists{/gist_id}","starred_url":"https://api.github.com/users/nuss-justin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuss-justin/subscriptions","organizations_url":"https://api.github.com/users/nuss-justin/orgs","repos_url":"https://api.github.com/users/nuss-justin/repos","events_url":"https://api.github.com/users/nuss-justin/events{/privacy}","received_events_url":"https://api.github.com/users/nuss-justin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nuss-justin/sqlx","description":"general purpose extensions to golang's database/sql","fork":true,"url":"https://api.github.com/repos/nuss-justin/sqlx","forks_url":"https://api.github.com/repos/nuss-justin/sqlx/forks","keys_url":"https://api.github.com/repos/nuss-justin/sqlx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nuss-justin/sqlx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nuss-justin/sqlx/teams","hooks_url":"https://api.github.com/repos/nuss-justin/sqlx/hooks","issue_events_url":"https://api.github.com/repos/nuss-justin/sqlx/issues/events{/number}","events_url":"https://api.github.com/repos/nuss-justin/sqlx/events","assignees_url":"https://api.github.com/repos/nuss-justin/sqlx/assignees{/user}","branches_url":"https://api.github.com/repos/nuss-justin/sqlx/branches{/branch}","tags_url":"https://api.github.com/repos/nuss-justin/sqlx/tags","blobs_url":"https://api.github.com/repos/nuss-justin/sqlx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nuss-justin/sqlx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nuss-justin/sqlx/git/refs{/sha}","trees_url":"https://api.github.com/repos/nuss-justin/sqlx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nuss-justin/sqlx/statuses/{sha}","languages_url":"https://api.github.com/repos/nuss-justin/sqlx/languages","stargazers_url":"https://api.github.com/repos/nuss-justin/sqlx/stargazers","contributors_url":"https://api.github.com/repos/nuss-justin/sqlx/contributors","subscribers_url":"https://api.github.com/repos/nuss-justin/sqlx/subscribers","subscription_url":"https://api.github.com/repos/nuss-justin/sqlx/subscription","commits_url":"https://api.github.com/repos/nuss-justin/sqlx/commits{/sha}","git_commits_url":"https://api.github.com/repos/nuss-justin/sqlx/git/commits{/sha}","comments_url":"https://api.github.com/repos/nuss-justin/sqlx/comments{/number}","issue_comment_url":"https://api.github.com/repos/nuss-justin/sqlx/issues/comments{/number}","contents_url":"https://api.github.com/repos/nuss-justin/sqlx/contents/{+path}","compare_url":"https://api.github.com/repos/nuss-justin/sqlx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nuss-justin/sqlx/merges","archive_url":"https://api.github.com/repos/nuss-justin/sqlx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nuss-justin/sqlx/downloads","issues_url":"https://api.github.com/repos/nuss-justin/sqlx/issues{/number}","pulls_url":"https://api.github.com/repos/nuss-justin/sqlx/pulls{/number}","milestones_url":"https://api.github.com/repos/nuss-justin/sqlx/milestones{/number}","notifications_url":"https://api.github.com/repos/nuss-justin/sqlx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nuss-justin/sqlx/labels{/name}","releases_url":"https://api.github.com/repos/nuss-justin/sqlx/releases{/id}","created_at":"2015-08-04T18:59:04Z","updated_at":"2015-08-04T18:59:05Z","pushed_at":"2015-08-04T19:00:09Z","git_url":"git://github.com/nuss-justin/sqlx.git","ssh_url":"git@github.com:nuss-justin/sqlx.git","clone_url":"https://github.com/nuss-justin/sqlx.git","svn_url":"https://github.com/nuss-justin/sqlx","homepage":"http://jmoiron.github.io/sqlx/","size":587,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jmoiron:master","ref":"master","sha":"56b62f29e9936b8fc0db14ed01297f88ba518333","user":{"login":"jmoiron","id":218132,"avatar_url":"https://avatars.githubusercontent.com/u/218132?v=3","gravatar_id":"","url":"https://api.github.com/users/jmoiron","html_url":"https://github.com/jmoiron","followers_url":"https://api.github.com/users/jmoiron/followers","following_url":"https://api.github.com/users/jmoiron/following{/other_user}","gists_url":"https://api.github.com/users/jmoiron/gists{/gist_id}","starred_url":"https://api.github.com/users/jmoiron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmoiron/subscriptions","organizations_url":"https://api.github.com/users/jmoiron/orgs","repos_url":"https://api.github.com/users/jmoiron/repos","events_url":"https://api.github.com/users/jmoiron/events{/privacy}","received_events_url":"https://api.github.com/users/jmoiron/received_events","type":"User","site_admin":false},"repo":{"id":7877397,"name":"sqlx","full_name":"jmoiron/sqlx","owner":{"login":"jmoiron","id":218132,"avatar_url":"https://avatars.githubusercontent.com/u/218132?v=3","gravatar_id":"","url":"https://api.github.com/users/jmoiron","html_url":"https://github.com/jmoiron","followers_url":"https://api.github.com/users/jmoiron/followers","following_url":"https://api.github.com/users/jmoiron/following{/other_user}","gists_url":"https://api.github.com/users/jmoiron/gists{/gist_id}","starred_url":"https://api.github.com/users/jmoiron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmoiron/subscriptions","organizations_url":"https://api.github.com/users/jmoiron/orgs","repos_url":"https://api.github.com/users/jmoiron/repos","events_url":"https://api.github.com/users/jmoiron/events{/privacy}","received_events_url":"https://api.github.com/users/jmoiron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmoiron/sqlx","description":"general purpose extensions to golang's database/sql","fork":false,"url":"https://api.github.com/repos/jmoiron/sqlx","forks_url":"https://api.github.com/repos/jmoiron/sqlx/forks","keys_url":"https://api.github.com/repos/jmoiron/sqlx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmoiron/sqlx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmoiron/sqlx/teams","hooks_url":"https://api.github.com/repos/jmoiron/sqlx/hooks","issue_events_url":"https://api.github.com/repos/jmoiron/sqlx/issues/events{/number}","events_url":"https://api.github.com/repos/jmoiron/sqlx/events","assignees_url":"https://api.github.com/repos/jmoiron/sqlx/assignees{/user}","branches_url":"https://api.github.com/repos/jmoiron/sqlx/branches{/branch}","tags_url":"https://api.github.com/repos/jmoiron/sqlx/tags","blobs_url":"https://api.github.com/repos/jmoiron/sqlx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmoiron/sqlx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmoiron/sqlx/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmoiron/sqlx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmoiron/sqlx/statuses/{sha}","languages_url":"https://api.github.com/repos/jmoiron/sqlx/languages","stargazers_url":"https://api.github.com/repos/jmoiron/sqlx/stargazers","contributors_url":"https://api.github.com/repos/jmoiron/sqlx/contributors","subscribers_url":"https://api.github.com/repos/jmoiron/sqlx/subscribers","subscription_url":"https://api.github.com/repos/jmoiron/sqlx/subscription","commits_url":"https://api.github.com/repos/jmoiron/sqlx/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmoiron/sqlx/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmoiron/sqlx/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmoiron/sqlx/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmoiron/sqlx/contents/{+path}","compare_url":"https://api.github.com/repos/jmoiron/sqlx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmoiron/sqlx/merges","archive_url":"https://api.github.com/repos/jmoiron/sqlx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmoiron/sqlx/downloads","issues_url":"https://api.github.com/repos/jmoiron/sqlx/issues{/number}","pulls_url":"https://api.github.com/repos/jmoiron/sqlx/pulls{/number}","milestones_url":"https://api.github.com/repos/jmoiron/sqlx/milestones{/number}","notifications_url":"https://api.github.com/repos/jmoiron/sqlx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmoiron/sqlx/labels{/name}","releases_url":"https://api.github.com/repos/jmoiron/sqlx/releases{/id}","created_at":"2013-01-28T19:40:00Z","updated_at":"2015-08-04T18:17:17Z","pushed_at":"2015-08-04T19:10:25Z","git_url":"git://github.com/jmoiron/sqlx.git","ssh_url":"git@github.com:jmoiron/sqlx.git","clone_url":"https://github.com/jmoiron/sqlx.git","svn_url":"https://github.com/jmoiron/sqlx","homepage":"http://jmoiron.github.io/sqlx/","size":1433,"stargazers_count":1119,"watchers_count":1119,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":85,"mirror_url":null,"open_issues_count":13,"forks":85,"open_issues":13,"watchers":1119,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmoiron/sqlx/pulls/156"},"html":{"href":"https://github.com/jmoiron/sqlx/pull/156"},"issue":{"href":"https://api.github.com/repos/jmoiron/sqlx/issues/156"},"comments":{"href":"https://api.github.com/repos/jmoiron/sqlx/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/jmoiron/sqlx/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/jmoiron/sqlx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jmoiron/sqlx/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/jmoiron/sqlx/statuses/740016868829e4a0dd418d82d900db43c1edd8e6"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":79,"deletions":45,"changed_files":2}}