{"action":"created","issue":{"url":"https://api.github.com/repos/tgruben/roaring/issues/41","labels_url":"https://api.github.com/repos/tgruben/roaring/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/tgruben/roaring/issues/41/comments","events_url":"https://api.github.com/repos/tgruben/roaring/issues/41/events","html_url":"https://github.com/tgruben/roaring/pull/41","id":110334605,"number":41,"title":"Use unsafe/reflect in serialization","user":{"login":"willglynn","id":118362,"avatar_url":"https://avatars.githubusercontent.com/u/118362?v=3","gravatar_id":"","url":"https://api.github.com/users/willglynn","html_url":"https://github.com/willglynn","followers_url":"https://api.github.com/users/willglynn/followers","following_url":"https://api.github.com/users/willglynn/following{/other_user}","gists_url":"https://api.github.com/users/willglynn/gists{/gist_id}","starred_url":"https://api.github.com/users/willglynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willglynn/subscriptions","organizations_url":"https://api.github.com/users/willglynn/orgs","repos_url":"https://api.github.com/users/willglynn/repos","events_url":"https://api.github.com/users/willglynn/events{/privacy}","received_events_url":"https://api.github.com/users/willglynn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-07T22:54:10Z","updated_at":"2015-10-07T23:30:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tgruben/roaring/pulls/41","html_url":"https://github.com/tgruben/roaring/pull/41","diff_url":"https://github.com/tgruben/roaring/pull/41.diff","patch_url":"https://github.com/tgruben/roaring/pull/41.patch"},"body":"Serialized representations are just little endian byte slices, which can be obtained by referencing the data slice directly on certain platforms. \r\n\r\nOn my machine, this results in 64%, 88%, and 90% reductions in runtime for `BenchmarkSerialization{Sparse,Mid,Dense}`:\r\n\r\n    $ git checkout master\r\n    Switched to branch 'master'\r\n    Your branch is up-to-date with 'origin/master'.\r\n    $ go test -bench BenchmarkSerialization -run -\r\n    PASS\r\n    BenchmarkSerializationSparse-8\t    5000\t    275510 ns/op\r\n    BenchmarkSerializationMid-8   \t   10000\t    128213 ns/op\r\n    BenchmarkSerializationDense-8 \t  100000\t     20826 ns/op\r\n    ok  \tgithub.com/tgruben/roaring\t5.112s\r\n    $ git checkout unsafe_serialization\r\n    Switched to branch 'unsafe_serialization'\r\n    $ go test -bench BenchmarkSerialization -run -\r\n    PASS\r\n    BenchmarkSerializationSparse-8\t   20000\t     97988 ns/op\r\n    BenchmarkSerializationMid-8   \t  100000\t     14870 ns/op\r\n    BenchmarkSerializationDense-8 \t 1000000\t      2043 ns/op\r\n    ok  \tgithub.com/tgruben/roaring\t6.800s\r\n"},"comment":{"url":"https://api.github.com/repos/tgruben/roaring/issues/comments/146366669","html_url":"https://github.com/tgruben/roaring/pull/41#issuecomment-146366669","issue_url":"https://api.github.com/repos/tgruben/roaring/issues/41","id":146366669,"user":{"login":"lemire","id":391987,"avatar_url":"https://avatars.githubusercontent.com/u/391987?v=3","gravatar_id":"","url":"https://api.github.com/users/lemire","html_url":"https://github.com/lemire","followers_url":"https://api.github.com/users/lemire/followers","following_url":"https://api.github.com/users/lemire/following{/other_user}","gists_url":"https://api.github.com/users/lemire/gists{/gist_id}","starred_url":"https://api.github.com/users/lemire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemire/subscriptions","organizations_url":"https://api.github.com/users/lemire/orgs","repos_url":"https://api.github.com/users/lemire/repos","events_url":"https://api.github.com/users/lemire/events{/privacy}","received_events_url":"https://api.github.com/users/lemire/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T23:30:45Z","updated_at":"2015-10-07T23:30:45Z","body":"@willglynn  \r\n\r\nExcellent.\r\n\r\nBefore merging this... one wonders... is there any chance that it would be easy to do the same thing for serialization, so that we have both accelerated serialization and deserialization?\r\n\r\nAnyhow, well worth your name on the contributors' list.\r\n"}}