{"action":"created","issue":{"url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/37","repository_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux","labels_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/37/comments","events_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/37/events","html_url":"https://github.com/ros-industrial-consortium/reuleaux/pull/37","id":194977249,"number":37,"title":"30% speed improvement in create_reachability_map","user":{"login":"facontidavide","id":2822888,"avatar_url":"https://avatars.githubusercontent.com/u/2822888?v=3","gravatar_id":"","url":"https://api.github.com/users/facontidavide","html_url":"https://github.com/facontidavide","followers_url":"https://api.github.com/users/facontidavide/followers","following_url":"https://api.github.com/users/facontidavide/following{/other_user}","gists_url":"https://api.github.com/users/facontidavide/gists{/gist_id}","starred_url":"https://api.github.com/users/facontidavide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facontidavide/subscriptions","organizations_url":"https://api.github.com/users/facontidavide/orgs","repos_url":"https://api.github.com/users/facontidavide/repos","events_url":"https://api.github.com/users/facontidavide/events{/privacy}","received_events_url":"https://api.github.com/users/facontidavide/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-12T13:42:55Z","updated_at":"2016-12-14T16:17:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/37","html_url":"https://github.com/ros-industrial-consortium/reuleaux/pull/37","diff_url":"https://github.com/ros-industrial-consortium/reuleaux/pull/37.diff","patch_url":"https://github.com/ros-industrial-consortium/reuleaux/pull/37.patch"},"body":"Hi,\r\n\r\nI noticed that the class SphereDiscretization does a lot of unnecessary copies.\r\nAdditionally, profiling the code with the command __perf__, I noticed that a surprisingly high number of CPU is used by the instructions __cos__ and __sin__.\r\nI realized that methods like SphereDiscretization::make_sphere_poses call cos() and sin() over and over again with the same angle.\r\n\r\nEDIT:\r\n\r\nI found even more places where memory from std::vector can be recycled and the call of sin and cos can be avoided.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/comments/267077777","html_url":"https://github.com/ros-industrial-consortium/reuleaux/pull/37#issuecomment-267077777","issue_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/37","id":267077777,"user":{"login":"akgoins","id":8662812,"avatar_url":"https://avatars.githubusercontent.com/u/8662812?v=3","gravatar_id":"","url":"https://api.github.com/users/akgoins","html_url":"https://github.com/akgoins","followers_url":"https://api.github.com/users/akgoins/followers","following_url":"https://api.github.com/users/akgoins/following{/other_user}","gists_url":"https://api.github.com/users/akgoins/gists{/gist_id}","starred_url":"https://api.github.com/users/akgoins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akgoins/subscriptions","organizations_url":"https://api.github.com/users/akgoins/orgs","repos_url":"https://api.github.com/users/akgoins/repos","events_url":"https://api.github.com/users/akgoins/events{/privacy}","received_events_url":"https://api.github.com/users/akgoins/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T16:17:22Z","updated_at":"2016-12-14T16:17:22Z","body":"@facontidavide, here is the backtrace:\r\n\r\n#0  0x00007ffff5af9c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56\r\n#1  0x00007ffff5afd028 in __GI_abort () at abort.c:89\r\n#2  0x00007ffff7af8af9 in boost::assertion::detail::assertion_failed_msg(char const*, char const*, char const*, char const*, long) ()   from /home/alex/reuleaux_ws/devel/lib/libsphere_discretization.so\r\n#3  0x00007ffff7afe024 in boost::array<geometry_msgs::Vector3_<std::allocator<void> >, 10ul>::operator[](unsigned long) ()   from /home/alex/reuleaux_ws/devel/lib/libsphere_discretization.so\r\n#4  0x00007ffff7af1bfb in sphere_discretization::SphereDiscretization::make_sphere_poses(octomath::Vector3 const&, double, std::vector<geometry_msgs::Pose_<std::allocator<void> >, std::allocator<geometry_msgs::Pose_<std::allocator<void> > > >&) ()   from /home/alex/reuleaux_ws/devel/lib/libsphere_discretization.so\r\n#5  0x00000000004310b8 in main ()\r\n"}}
{"actor":{"display_login":"akgoins"}}