{"action":"created","issue":{"url":"https://api.github.com/repos/open-policy-agent/opa/issues/58","repository_url":"https://api.github.com/repos/open-policy-agent/opa","labels_url":"https://api.github.com/repos/open-policy-agent/opa/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/open-policy-agent/opa/issues/58/comments","events_url":"https://api.github.com/repos/open-policy-agent/opa/issues/58/events","html_url":"https://github.com/open-policy-agent/opa/pull/58","id":164876506,"number":58,"title":"Initial topdown optimizations","user":{"login":"tsandall","id":238885,"avatar_url":"https://avatars.githubusercontent.com/u/238885?v=3","gravatar_id":"","url":"https://api.github.com/users/tsandall","html_url":"https://github.com/tsandall","followers_url":"https://api.github.com/users/tsandall/followers","following_url":"https://api.github.com/users/tsandall/following{/other_user}","gists_url":"https://api.github.com/users/tsandall/gists{/gist_id}","starred_url":"https://api.github.com/users/tsandall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsandall/subscriptions","organizations_url":"https://api.github.com/users/tsandall/orgs","repos_url":"https://api.github.com/users/tsandall/repos","events_url":"https://api.github.com/users/tsandall/events{/privacy}","received_events_url":"https://api.github.com/users/tsandall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"timothyhinrichs","id":10049579,"avatar_url":"https://avatars.githubusercontent.com/u/10049579?v=3","gravatar_id":"","url":"https://api.github.com/users/timothyhinrichs","html_url":"https://github.com/timothyhinrichs","followers_url":"https://api.github.com/users/timothyhinrichs/followers","following_url":"https://api.github.com/users/timothyhinrichs/following{/other_user}","gists_url":"https://api.github.com/users/timothyhinrichs/gists{/gist_id}","starred_url":"https://api.github.com/users/timothyhinrichs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothyhinrichs/subscriptions","organizations_url":"https://api.github.com/users/timothyhinrichs/orgs","repos_url":"https://api.github.com/users/timothyhinrichs/repos","events_url":"https://api.github.com/users/timothyhinrichs/events{/privacy}","received_events_url":"https://api.github.com/users/timothyhinrichs/received_events","type":"User","site_admin":false},"assignees":[{"login":"timothyhinrichs","id":10049579,"avatar_url":"https://avatars.githubusercontent.com/u/10049579?v=3","gravatar_id":"","url":"https://api.github.com/users/timothyhinrichs","html_url":"https://github.com/timothyhinrichs","followers_url":"https://api.github.com/users/timothyhinrichs/followers","following_url":"https://api.github.com/users/timothyhinrichs/following{/other_user}","gists_url":"https://api.github.com/users/timothyhinrichs/gists{/gist_id}","starred_url":"https://api.github.com/users/timothyhinrichs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothyhinrichs/subscriptions","organizations_url":"https://api.github.com/users/timothyhinrichs/orgs","repos_url":"https://api.github.com/users/timothyhinrichs/repos","events_url":"https://api.github.com/users/timothyhinrichs/events{/privacy}","received_events_url":"https://api.github.com/users/timothyhinrichs/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-07-11T16:16:22Z","updated_at":"2016-07-11T22:42:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/open-policy-agent/opa/pulls/58","html_url":"https://github.com/open-policy-agent/opa/pull/58","diff_url":"https://github.com/open-policy-agent/opa/pull/58.diff","patch_url":"https://github.com/open-policy-agent/opa/pull/58.patch"},"body":"This PR contains a few optimizations that I made to the topdown evaluation last week after doing some profiling. The individual optimization commits are fairly small and isolated.\r\n\r\nHere's the output of running the scheduler benchmark on the last 6 commits:\r\n\r\n```\r\n[work](benchmark)torin:~/Development/Styra/work/src/github.com/open-policy-agent/opa$ for rev in $(git rev-list HEAD...52b6684a8c03efe51cd4e166b8b60e5197cb747d | head -n 10 | xargs); do git checkout $rev; make perf; done\r\nNote: checking out '533784940a1e1304fa9e6db1e780cd4e2fda690c'.\r\n\r\nYou are in 'detached HEAD' state. You can look around, make experimental\r\nchanges and commit them, and you can discard any commits you make in this\r\nstate without impacting any branches by performing another checkout.\r\n\r\nIf you want to create a new branch to retain commits you create, you may\r\ndo so (now or later) by using -b with the checkout command again. Example:\r\n\r\n  git checkout -b <new-branch-name>\r\n\r\nHEAD is now at 5337849... Optimization: Avoid slice copies in hotspots\r\ngo generate\r\ngo test -v -bench=. ./test/perf/.../\r\ntesting: warning: no tests to run\r\nPASS\r\nBenchmarkScheduler10Nodes-8\t       1\t2803496994 ns/op\r\nok  \tgithub.com/open-policy-agent/opa/test/perf/scheduler\t2.854s\r\nPrevious HEAD position was 5337849... Optimization: Avoid slice copies in hotspots\r\nHEAD is now at f106040... Optimization: Avoid plug on indexing check\r\ngo generate\r\ngo test -v -bench=. ./test/perf/.../\r\ntesting: warning: no tests to run\r\nPASS\r\nBenchmarkScheduler10Nodes-8\t       1\t3111978150 ns/op\r\nok  \tgithub.com/open-policy-agent/opa/test/perf/scheduler\t3.158s\r\nPrevious HEAD position was f106040... Optimization: Avoid plug on indexing check\r\nHEAD is now at b840758... Optimization: Remove copying of bindings\r\ngo generate\r\ngo test -v -bench=. ./test/perf/.../\r\ntesting: warning: no tests to run\r\nPASS\r\nBenchmarkScheduler10Nodes-8\t       1\t3258621573 ns/op\r\nok  \tgithub.com/open-policy-agent/opa/test/perf/scheduler\t3.305s\r\nPrevious HEAD position was b840758... Optimization: Remove copying of bindings\r\nHEAD is now at 30e7066... Optimization: Defer unification until needed\r\ngo generate\r\ngo test -v -bench=. ./test/perf/.../\r\ntesting: warning: no tests to run\r\nPASS\r\nBenchmarkScheduler10Nodes-8\t       1\t3757969676 ns/op\r\nok  \tgithub.com/open-policy-agent/opa/test/perf/scheduler\t3.804s\r\nPrevious HEAD position was 30e7066... Optimization: Defer unification until needed\r\nHEAD is now at d0cd968... Optimization: Improve string and var term hashing\r\ngo generate\r\ngo test -v -bench=. ./test/perf/.../\r\ntesting: warning: no tests to run\r\nPASS\r\nBenchmarkScheduler10Nodes-8\t       1\t3994262904 ns/op\r\nok  \tgithub.com/open-policy-agent/opa/test/perf/scheduler\t4.041s\r\nPrevious HEAD position was d0cd968... Optimization: Improve string and var term hashing\r\nHEAD is now at d12d3a4... Vendoring: Add siphash and update dependencies\r\ngo generate\r\ngo test -v -bench=. ./test/perf/.../\r\ntesting: warning: no tests to run\r\nPASS\r\nBenchmarkScheduler10Nodes-8\t       1\t4915227223 ns/op\r\nok  \tgithub.com/open-policy-agent/opa/test/perf/scheduler\t4.962s\r\n[work](detached*)torin:~/Development/Styra/work/src/github.com/open-policy-agent/opa$\r\n```"},"comment":{"url":"https://api.github.com/repos/open-policy-agent/opa/issues/comments/231887541","html_url":"https://github.com/open-policy-agent/opa/pull/58#issuecomment-231887541","issue_url":"https://api.github.com/repos/open-policy-agent/opa/issues/58","id":231887541,"user":{"login":"timothyhinrichs","id":10049579,"avatar_url":"https://avatars.githubusercontent.com/u/10049579?v=3","gravatar_id":"","url":"https://api.github.com/users/timothyhinrichs","html_url":"https://github.com/timothyhinrichs","followers_url":"https://api.github.com/users/timothyhinrichs/followers","following_url":"https://api.github.com/users/timothyhinrichs/following{/other_user}","gists_url":"https://api.github.com/users/timothyhinrichs/gists{/gist_id}","starred_url":"https://api.github.com/users/timothyhinrichs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothyhinrichs/subscriptions","organizations_url":"https://api.github.com/users/timothyhinrichs/orgs","repos_url":"https://api.github.com/users/timothyhinrichs/repos","events_url":"https://api.github.com/users/timothyhinrichs/events{/privacy}","received_events_url":"https://api.github.com/users/timothyhinrichs/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T22:42:05Z","updated_at":"2016-07-11T22:42:05Z","body":"Finished comments on this PR"}}
{"actor":{"display_login":"timothyhinrichs"}}