{"action":"created","issue":{"url":"https://api.github.com/repos/rust-num/num/issues/133","labels_url":"https://api.github.com/repos/rust-num/num/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/rust-num/num/issues/133/comments","events_url":"https://api.github.com/repos/rust-num/num/issues/133/events","html_url":"https://github.com/rust-num/num/pull/133","id":117072283,"number":133,"title":"[RFC] Some performance improvements","user":{"login":"koverstreet","id":1993710,"avatar_url":"https://avatars.githubusercontent.com/u/1993710?v=3","gravatar_id":"","url":"https://api.github.com/users/koverstreet","html_url":"https://github.com/koverstreet","followers_url":"https://api.github.com/users/koverstreet/followers","following_url":"https://api.github.com/users/koverstreet/following{/other_user}","gists_url":"https://api.github.com/users/koverstreet/gists{/gist_id}","starred_url":"https://api.github.com/users/koverstreet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koverstreet/subscriptions","organizations_url":"https://api.github.com/users/koverstreet/orgs","repos_url":"https://api.github.com/users/koverstreet/repos","events_url":"https://api.github.com/users/koverstreet/events{/privacy}","received_events_url":"https://api.github.com/users/koverstreet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-11-16T08:08:40Z","updated_at":"2015-12-10T22:07:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-num/num/pulls/133","html_url":"https://github.com/rust-num/num/pull/133","diff_url":"https://github.com/rust-num/num/pull/133.diff","patch_url":"https://github.com/rust-num/num/pull/133.patch"},"body":"I added add and subtract methods that take an operand by value, instead of by reference, so they can work in place instead of always allocating new BigInts for the result.\r\n\r\nI'd like to hear if anyone knows a better way of doing this, though - with the various wrappers/forwardings doing this for all the operations is going to be a mess and add a ton of boilerplate. I haven't even tried to do a complete job of it yet.\r\n\r\nI'm starting to think the sanest thing to do would be to only have in place implements of most of the operations - and have the wrappers clone() if necessary. That way, the only extra work we're doing is a memcpy(), which is a hell of a lot faster than a heap allocation."},"comment":{"url":"https://api.github.com/repos/rust-num/num/issues/comments/163763479","html_url":"https://github.com/rust-num/num/pull/133#issuecomment-163763479","issue_url":"https://api.github.com/repos/rust-num/num/issues/133","id":163763479,"user":{"login":"cuviper","id":36186,"avatar_url":"https://avatars.githubusercontent.com/u/36186?v=3","gravatar_id":"","url":"https://api.github.com/users/cuviper","html_url":"https://github.com/cuviper","followers_url":"https://api.github.com/users/cuviper/followers","following_url":"https://api.github.com/users/cuviper/following{/other_user}","gists_url":"https://api.github.com/users/cuviper/gists{/gist_id}","starred_url":"https://api.github.com/users/cuviper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuviper/subscriptions","organizations_url":"https://api.github.com/users/cuviper/orgs","repos_url":"https://api.github.com/users/cuviper/repos","events_url":"https://api.github.com/users/cuviper/events{/privacy}","received_events_url":"https://api.github.com/users/cuviper/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T22:07:46Z","updated_at":"2015-12-10T22:07:46Z","body":"But it's ignored, for good reason, and not using the same input values as\nthe benchmark.\n\nLet's not belabor this small point.  If it's still unclear, leave it to me\nto add later.\n"}}