{"action":"created","issue":{"url":"https://api.github.com/repos/mathics/Mathics/issues/461","repository_url":"https://api.github.com/repos/mathics/Mathics","labels_url":"https://api.github.com/repos/mathics/Mathics/issues/461/labels{/name}","comments_url":"https://api.github.com/repos/mathics/Mathics/issues/461/comments","events_url":"https://api.github.com/repos/mathics/Mathics/issues/461/events","html_url":"https://github.com/mathics/Mathics/pull/461","id":166494189,"number":461,"title":"AngleVector[] and AnglePath[]","user":{"login":"poke1024","id":11859538,"avatar_url":"https://avatars.githubusercontent.com/u/11859538?v=3","gravatar_id":"","url":"https://api.github.com/users/poke1024","html_url":"https://github.com/poke1024","followers_url":"https://api.github.com/users/poke1024/followers","following_url":"https://api.github.com/users/poke1024/following{/other_user}","gists_url":"https://api.github.com/users/poke1024/gists{/gist_id}","starred_url":"https://api.github.com/users/poke1024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poke1024/subscriptions","organizations_url":"https://api.github.com/users/poke1024/orgs","repos_url":"https://api.github.com/users/poke1024/repos","events_url":"https://api.github.com/users/poke1024/events{/privacy}","received_events_url":"https://api.github.com/users/poke1024/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mathics/Mathics/labels/enhancement","name":"enhancement","color":"0b02e1"},{"url":"https://api.github.com/repos/mathics/Mathics/labels/needs%20review","name":"needs review","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-20T04:36:46Z","updated_at":"2016-07-29T10:16:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mathics/Mathics/pulls/461","html_url":"https://github.com/mathics/Mathics/pull/461","diff_url":"https://github.com/mathics/Mathics/pull/461.diff","patch_url":"https://github.com/mathics/Mathics/pull/461.patch"},"body":"Seemed so simple, but is now quite elaborate since a special case for numerical evaluation seems important to me, as speed is an issue here.\r\n\r\nOne thing that vexes me is that numerical evaluation does not automatically get triggered when using this in `Graphics`, which means that a very slow symbolic evaluation is triggered inside `Graphics` if one does not specify numerical quantities. More specifically:\r\n\r\n```\r\nTiming[Graphics[Line[AnglePath[Table[90 Degree, {20}]]]]]\r\n{3.6392160000000002, -Graphics-}\r\n\r\nTiming[Graphics[Line[AnglePath[Table[1.57, {20}]]]]]\r\n{0.013397999999999577, -Graphics-}\r\n```\r\n\r\nAs you can see, the numerical evaluation (due to the special case in `AnglePath`) is about two magnitudes faster. I really wonder how we could get `Graphics` to do a recursive `N` on all its sub expressions before these get evaluated..."},"comment":{"url":"https://api.github.com/repos/mathics/Mathics/issues/comments/236145471","html_url":"https://github.com/mathics/Mathics/pull/461#issuecomment-236145471","issue_url":"https://api.github.com/repos/mathics/Mathics/issues/461","id":236145471,"user":{"login":"poke1024","id":11859538,"avatar_url":"https://avatars.githubusercontent.com/u/11859538?v=3","gravatar_id":"","url":"https://api.github.com/users/poke1024","html_url":"https://github.com/poke1024","followers_url":"https://api.github.com/users/poke1024/followers","following_url":"https://api.github.com/users/poke1024/following{/other_user}","gists_url":"https://api.github.com/users/poke1024/gists{/gist_id}","starred_url":"https://api.github.com/users/poke1024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poke1024/subscriptions","organizations_url":"https://api.github.com/users/poke1024/orgs","repos_url":"https://api.github.com/users/poke1024/repos","events_url":"https://api.github.com/users/poke1024/events{/privacy}","received_events_url":"https://api.github.com/users/poke1024/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T10:16:37Z","updated_at":"2016-07-29T10:16:37Z","body":"@sn6uv @bnjones \r\n\r\nFound one major factor: changing `Real.__hash__` from the current implementation (`hash((\"Real\", self.to_sympy().n(dps(_prec))))`) to `hash((\"Real\", self.to_python()))` chops off 20% or more of the performance. Obviously this still needs to be rounded to 7 digits, as the comment there says.\r\n\r\nBefore:\r\n`Timing[Length[AnglePath[Table[0.1, {50000}]]]]\r\nOut[3]= {2.043277, 1}`\r\n\r\nAfter:\r\n`Timing[Length[AnglePath[Table[0.1, {50000}]]]]\r\nOut[5]= {1.4336660000000006, 1}`\r\n\r\nMaybe this can be addressed in #463?\r\n\r\n\r\n"}}
{"actor":{"display_login":"poke1024"}}