{"action":"created","issue":{"url":"https://api.github.com/repos/ska-sa/PySPEAD/issues/1","labels_url":"https://api.github.com/repos/ska-sa/PySPEAD/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ska-sa/PySPEAD/issues/1/comments","events_url":"https://api.github.com/repos/ska-sa/PySPEAD/issues/1/events","html_url":"https://github.com/ska-sa/PySPEAD/pull/1","id":50962691,"number":1,"title":"Optimisations for common cases","user":{"login":"bmerry","id":1963944,"avatar_url":"https://avatars.githubusercontent.com/u/1963944?v=3","gravatar_id":"","url":"https://api.github.com/users/bmerry","html_url":"https://github.com/bmerry","followers_url":"https://api.github.com/users/bmerry/followers","following_url":"https://api.github.com/users/bmerry/following{/other_user}","gists_url":"https://api.github.com/users/bmerry/gists{/gist_id}","starred_url":"https://api.github.com/users/bmerry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmerry/subscriptions","organizations_url":"https://api.github.com/users/bmerry/orgs","repos_url":"https://api.github.com/users/bmerry/repos","events_url":"https://api.github.com/users/bmerry/events{/privacy}","received_events_url":"https://api.github.com/users/bmerry/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ska-sa/PySPEAD/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"sratcliffe","id":161897,"avatar_url":"https://avatars.githubusercontent.com/u/161897?v=3","gravatar_id":"","url":"https://api.github.com/users/sratcliffe","html_url":"https://github.com/sratcliffe","followers_url":"https://api.github.com/users/sratcliffe/followers","following_url":"https://api.github.com/users/sratcliffe/following{/other_user}","gists_url":"https://api.github.com/users/sratcliffe/gists{/gist_id}","starred_url":"https://api.github.com/users/sratcliffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sratcliffe/subscriptions","organizations_url":"https://api.github.com/users/sratcliffe/orgs","repos_url":"https://api.github.com/users/sratcliffe/repos","events_url":"https://api.github.com/users/sratcliffe/events{/privacy}","received_events_url":"https://api.github.com/users/sratcliffe/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2014-12-04T11:08:02Z","updated_at":"2015-11-22T19:56:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ska-sa/PySPEAD/pulls/1","html_url":"https://github.com/ska-sa/PySPEAD/pull/1","diff_url":"https://github.com/ska-sa/PySPEAD/pull/1.diff","patch_url":"https://github.com/ska-sa/PySPEAD/pull/1.patch"},"body":"There are four optimisations:\r\n- spead_add_packet is made O(1) for a packet that arrives in-order\r\n  (payload_off is higher than other packets already processed)\r\n- spead_got_all_packets is made O(1) in the absense of duplicated\r\n  packets (and still fast overall if few packets are duplicated)\r\n- spead_heap_finalize copies chunks of memory with memcpy, instead of\r\n  looking for one byte at a time\r\n- The packet buffer in the Python code is changed from a Python list to\r\n  a deque, to avoid O(N) insertions."},"comment":{"url":"https://api.github.com/repos/ska-sa/PySPEAD/issues/comments/158793611","html_url":"https://github.com/ska-sa/PySPEAD/pull/1#issuecomment-158793611","issue_url":"https://api.github.com/repos/ska-sa/PySPEAD/issues/1","id":158793611,"user":{"login":"bmerry","id":1963944,"avatar_url":"https://avatars.githubusercontent.com/u/1963944?v=3","gravatar_id":"","url":"https://api.github.com/users/bmerry","html_url":"https://github.com/bmerry","followers_url":"https://api.github.com/users/bmerry/followers","following_url":"https://api.github.com/users/bmerry/following{/other_user}","gists_url":"https://api.github.com/users/bmerry/gists{/gist_id}","starred_url":"https://api.github.com/users/bmerry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmerry/subscriptions","organizations_url":"https://api.github.com/users/bmerry/orgs","repos_url":"https://api.github.com/users/bmerry/repos","events_url":"https://api.github.com/users/bmerry/events{/privacy}","received_events_url":"https://api.github.com/users/bmerry/received_events","type":"User","site_admin":false},"created_at":"2015-11-22T19:56:26Z","updated_at":"2015-11-22T19:56:26Z","body":"Reopening since it has some chance of seeing the light of day. On the other hand, if the performance isn't needed it might be safer just to not merge."}}