{"action":"created","issue":{"url":"https://api.github.com/repos/dropbox/pyston/issues/629","labels_url":"https://api.github.com/repos/dropbox/pyston/issues/629/labels{/name}","comments_url":"https://api.github.com/repos/dropbox/pyston/issues/629/comments","events_url":"https://api.github.com/repos/dropbox/pyston/issues/629/events","html_url":"https://github.com/dropbox/pyston/pull/629","id":89938817,"number":629,"title":"rewriter: dedup attr lookups","user":{"login":"tjhance","id":592054,"avatar_url":"https://avatars.githubusercontent.com/u/592054?v=3","gravatar_id":"","url":"https://api.github.com/users/tjhance","html_url":"https://github.com/tjhance","followers_url":"https://api.github.com/users/tjhance/followers","following_url":"https://api.github.com/users/tjhance/following{/other_user}","gists_url":"https://api.github.com/users/tjhance/gists{/gist_id}","starred_url":"https://api.github.com/users/tjhance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjhance/subscriptions","organizations_url":"https://api.github.com/users/tjhance/orgs","repos_url":"https://api.github.com/users/tjhance/repos","events_url":"https://api.github.com/users/tjhance/events{/privacy}","received_events_url":"https://api.github.com/users/tjhance/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-21T17:41:27Z","updated_at":"2015-06-22T07:44:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dropbox/pyston/pulls/629","html_url":"https://github.com/dropbox/pyston/pull/629","diff_url":"https://github.com/dropbox/pyston/pull/629.diff","patch_url":"https://github.com/dropbox/pyston/pull/629.patch"},"body":"A small improvement. virtualenv_bench is -3.3% somehow.\r\n\r\nNext I want to unify the attr lookups with the attr guards since there is some redundancy there\r\n\r\n```\r\npyston (calibration)                      :    1.0s baseline: 1.0 (-0.1%)\r\npyston django_template.py                 :    8.0s baseline: 8.0 (+0.0%)\r\npyston pyxl_bench.py                      :    5.3s baseline: 5.4 (-0.9%)\r\npyston sqlalchemy_imperative.py           :    3.7s baseline: 3.7 (-0.0%)\r\npyston django_migrate.py                  :    3.3s baseline: 3.3 (+0.1%)\r\npyston virtualenv_bench.py                :    8.4s baseline: 8.7 (-3.3%)\r\npyston interp2.py                         :    4.7s baseline: 4.7 (-0.0%)\r\npyston raytrace.py                        :    6.3s baseline: 6.2 (+0.7%)\r\npyston nbody.py                           :    7.3s baseline: 7.3 (-0.1%)\r\npyston fannkuch.py                        :    6.3s baseline: 6.4 (-0.6%)\r\npyston chaos.py                           :   19.6s baseline: 19.8 (-0.7%)\r\npyston fasta.py                           :    4.6s baseline: 4.6 (-0.1%)\r\npyston pidigits.py                        :    5.8s baseline: 5.8 (+0.1%)\r\npyston richards.py                        :    1.7s baseline: 1.7 (+0.2%)\r\npyston deltablue.py                       :    1.9s baseline: 1.9 (-0.2%)\r\npyston (geomean-784d)                     :    5.2s baseline: 5.2 (-0.3%)\r\n```"},"comment":{"url":"https://api.github.com/repos/dropbox/pyston/issues/comments/114029635","html_url":"https://github.com/dropbox/pyston/pull/629#issuecomment-114029635","issue_url":"https://api.github.com/repos/dropbox/pyston/issues/629","id":114029635,"user":{"login":"tjhance","id":592054,"avatar_url":"https://avatars.githubusercontent.com/u/592054?v=3","gravatar_id":"","url":"https://api.github.com/users/tjhance","html_url":"https://github.com/tjhance","followers_url":"https://api.github.com/users/tjhance/followers","following_url":"https://api.github.com/users/tjhance/following{/other_user}","gists_url":"https://api.github.com/users/tjhance/gists{/gist_id}","starred_url":"https://api.github.com/users/tjhance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjhance/subscriptions","organizations_url":"https://api.github.com/users/tjhance/orgs","repos_url":"https://api.github.com/users/tjhance/repos","events_url":"https://api.github.com/users/tjhance/events{/privacy}","received_events_url":"https://api.github.com/users/tjhance/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T07:44:13Z","updated_at":"2015-06-22T07:44:13Z","body":"Did a bit more work. I basically re-wrote the whole way we do guards. Now we consolidate all the guard information for a single variable to determine if we want to do one equality guard or some # of inequality guards. Then we do all those guards at once. Furthermore, this information is stored on the variable being guarded, and in the case of an attr guard, we create a variable for the guard. This let's us deduplicate when the same attr is accessed both through a guard and through the normal means.\r\n\r\nThe numbers seemed kinda good, although jitdev seemed to be giving really inconsistent results today (and they disagreed with the results I posted earlier, in a bad way :\\ ) so I'm not going to post numbers or make any promises right now...\r\n\r\nTODO: actually look at the assembly being generated :P (for now, sleep time)"}}