{"action":"created","issue":{"url":"https://api.github.com/repos/garyburd/redigo/issues/127","labels_url":"https://api.github.com/repos/garyburd/redigo/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/garyburd/redigo/issues/127/comments","events_url":"https://api.github.com/repos/garyburd/redigo/issues/127/events","html_url":"https://github.com/garyburd/redigo/pull/127","id":90538113,"number":127,"title":"Improve performance of LookupCommandInfo.","user":{"login":"clutchski","id":92482,"avatar_url":"https://avatars.githubusercontent.com/u/92482?v=3","gravatar_id":"","url":"https://api.github.com/users/clutchski","html_url":"https://github.com/clutchski","followers_url":"https://api.github.com/users/clutchski/followers","following_url":"https://api.github.com/users/clutchski/following{/other_user}","gists_url":"https://api.github.com/users/clutchski/gists{/gist_id}","starred_url":"https://api.github.com/users/clutchski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clutchski/subscriptions","organizations_url":"https://api.github.com/users/clutchski/orgs","repos_url":"https://api.github.com/users/clutchski/repos","events_url":"https://api.github.com/users/clutchski/events{/privacy}","received_events_url":"https://api.github.com/users/clutchski/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-24T01:46:14Z","updated_at":"2015-06-24T03:53:00Z","closed_at":"2015-06-24T03:51:22Z","pull_request":{"url":"https://api.github.com/repos/garyburd/redigo/pulls/127","html_url":"https://github.com/garyburd/redigo/pull/127","diff_url":"https://github.com/garyburd/redigo/pull/127.diff","patch_url":"https://github.com/garyburd/redigo/pull/127.patch"},"body":"Converting command names to upper case is a non-trival part of our\r\nprofile. Assuming that 99% of programmers don't use mixed case,\r\nwe can optimize that by explicitly checking the lower/upper case\r\ncommands and short-circuiting before upper casing.\r\n\r\nThis makes mixed cases marginally slower, but makes the common case much\r\nfaster. A good trade-off I think.\r\n\r\n```\r\nBEFORE:\r\n\r\nBenchmarkLookupCommandInfoCorrectCase    2000000           716 ns/op\r\nBenchmarkLookupCommandInfoMixedCase      3000000           532 ns/op\r\n\r\nAFTER:\r\n\r\nBenchmarkLookupCommandInfoCorrectCase   10000000           131 ns/op\r\nBenchmarkLookupCommandInfoMixedCase     2000000           593 ns/op\r\n```"},"comment":{"url":"https://api.github.com/repos/garyburd/redigo/issues/comments/114720731","html_url":"https://github.com/garyburd/redigo/pull/127#issuecomment-114720731","issue_url":"https://api.github.com/repos/garyburd/redigo/issues/127","id":114720731,"user":{"login":"garyburd","id":33411,"avatar_url":"https://avatars.githubusercontent.com/u/33411?v=3","gravatar_id":"","url":"https://api.github.com/users/garyburd","html_url":"https://github.com/garyburd","followers_url":"https://api.github.com/users/garyburd/followers","following_url":"https://api.github.com/users/garyburd/following{/other_user}","gists_url":"https://api.github.com/users/garyburd/gists{/gist_id}","starred_url":"https://api.github.com/users/garyburd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyburd/subscriptions","organizations_url":"https://api.github.com/users/garyburd/orgs","repos_url":"https://api.github.com/users/garyburd/repos","events_url":"https://api.github.com/users/garyburd/events{/privacy}","received_events_url":"https://api.github.com/users/garyburd/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T03:53:00Z","updated_at":"2015-06-24T03:53:00Z","body":"Thank you for pointing out the issue.  See 27a6a7d7c76db7d75feb28f82e91cb34160606c3."}}