{"action":"created","issue":{"url":"https://api.github.com/repos/paritytech/parity-common/issues/29","repository_url":"https://api.github.com/repos/paritytech/parity-common","labels_url":"https://api.github.com/repos/paritytech/parity-common/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/paritytech/parity-common/issues/29/comments","events_url":"https://api.github.com/repos/paritytech/parity-common/issues/29/events","html_url":"https://github.com/paritytech/parity-common/pull/29","id":352415660,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NzMwODYx","number":29,"title":"rlp: remove elastic-array crate and use Vec instead","user":{"login":"tafia","id":7351502,"node_id":"MDQ6VXNlcjczNTE1MDI=","avatar_url":"https://avatars1.githubusercontent.com/u/7351502?v=4","gravatar_id":"","url":"https://api.github.com/users/tafia","html_url":"https://github.com/tafia","followers_url":"https://api.github.com/users/tafia/followers","following_url":"https://api.github.com/users/tafia/following{/other_user}","gists_url":"https://api.github.com/users/tafia/gists{/gist_id}","starred_url":"https://api.github.com/users/tafia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tafia/subscriptions","organizations_url":"https://api.github.com/users/tafia/orgs","repos_url":"https://api.github.com/users/tafia/repos","events_url":"https://api.github.com/users/tafia/events{/privacy}","received_events_url":"https://api.github.com/users/tafia/received_events","type":"User","site_admin":false},"labels":[{"id":978995874,"node_id":"MDU6TGFiZWw5Nzg5OTU4NzQ=","url":"https://api.github.com/repos/paritytech/parity-common/labels/A3-inprogress","name":"A3-inprogress","color":"DBC6F8","default":false},{"id":978995903,"node_id":"MDU6TGFiZWw5Nzg5OTU5MDM=","url":"https://api.github.com/repos/paritytech/parity-common/labels/M4-core","name":"M4-core","color":"F5FCE6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":39,"created_at":"2018-08-21T07:22:50Z","updated_at":"2018-09-13T07:57:54Z","closed_at":"2018-09-13T07:51:08Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/paritytech/parity-common/pulls/29","html_url":"https://github.com/paritytech/parity-common/pull/29","diff_url":"https://github.com/paritytech/parity-common/pull/29.diff","patch_url":"https://github.com/paritytech/parity-common/pull/29.patch"},"body":"The main purpose is to reduce the unsafe surface (elastic-array uses a ton of them).\r\nThe unexpected consequence is to have a nice perf boost.\r\n\r\nOn my machine:\r\n```\r\n$ cargo benchcmp master vec \r\n name                             master ns/iter  vec ns/iter  diff ns/iter   diff %  speedup \r\n bench_decode_nested_empty_lists  400             368                   -32   -8.00%   x 1.09 \r\n bench_decode_u256_value          73              69                     -4   -5.48%   x 1.06 \r\n bench_decode_u64_value           58              56                     -2   -3.45%   x 1.04 \r\n bench_stream_1000_empty_lists    14,671          7,921              -6,750  -46.01%   x 1.85 \r\n bench_stream_nested_empty_lists  303             145                  -158  -52.15%   x 2.09 \r\n bench_stream_u256_value          440             354                   -86  -19.55%   x 1.24 \r\n bench_stream_u64_value           140             70                    -70  -50.00%   x 2.00 \r\n```\r\n\r\nMy guess is, given that elastic-array is quite an old crate, that it is a combination of\r\n- Vec implementation being better than it used to be\r\n- compiler being smarter and probably working very well with Vec in particular\r\n\r\nIt can also be that the bench is somehow wrong or does not represent the reality. I am not an expert enough on your use case to tell.\r\n\r\nRegarding formating issues, I have tried to use parity-ethereum rustfmt.toml but lot of config options are not recognized anymore by rustfmt-preview (stable 1.28). Do you have a recommendation here?\r\n\r\nOh, and this is a breaking change. I can adapt the other repos if needed later on."},"comment":{"url":"https://api.github.com/repos/paritytech/parity-common/issues/comments/420918235","html_url":"https://github.com/paritytech/parity-common/pull/29#issuecomment-420918235","issue_url":"https://api.github.com/repos/paritytech/parity-common/issues/29","id":420918235,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDkxODIzNQ==","user":{"login":"tafia","id":7351502,"node_id":"MDQ6VXNlcjczNTE1MDI=","avatar_url":"https://avatars1.githubusercontent.com/u/7351502?v=4","gravatar_id":"","url":"https://api.github.com/users/tafia","html_url":"https://github.com/tafia","followers_url":"https://api.github.com/users/tafia/followers","following_url":"https://api.github.com/users/tafia/following{/other_user}","gists_url":"https://api.github.com/users/tafia/gists{/gist_id}","starred_url":"https://api.github.com/users/tafia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tafia/subscriptions","organizations_url":"https://api.github.com/users/tafia/orgs","repos_url":"https://api.github.com/users/tafia/repos","events_url":"https://api.github.com/users/tafia/events{/privacy}","received_events_url":"https://api.github.com/users/tafia/received_events","type":"User","site_admin":false},"created_at":"2018-09-13T07:57:54Z","updated_at":"2018-09-13T07:57:54Z","author_association":"CONTRIBUTOR","body":"Awesome!"}}
{"actor":{"display_login":"tafia"}}