{"action":"created","issue":{"url":"https://api.github.com/repos/tikv/tikv/issues/3629","repository_url":"https://api.github.com/repos/tikv/tikv","labels_url":"https://api.github.com/repos/tikv/tikv/issues/3629/labels{/name}","comments_url":"https://api.github.com/repos/tikv/tikv/issues/3629/comments","events_url":"https://api.github.com/repos/tikv/tikv/issues/3629/events","html_url":"https://github.com/tikv/tikv/pull/3629","id":362882787,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NDczNDI3","number":3629,"title":"Efficient Codecs","user":{"login":"breeswish","id":1916485,"node_id":"MDQ6VXNlcjE5MTY0ODU=","avatar_url":"https://avatars3.githubusercontent.com/u/1916485?v=4","gravatar_id":"","url":"https://api.github.com/users/breeswish","html_url":"https://github.com/breeswish","followers_url":"https://api.github.com/users/breeswish/followers","following_url":"https://api.github.com/users/breeswish/following{/other_user}","gists_url":"https://api.github.com/users/breeswish/gists{/gist_id}","starred_url":"https://api.github.com/users/breeswish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breeswish/subscriptions","organizations_url":"https://api.github.com/users/breeswish/orgs","repos_url":"https://api.github.com/users/breeswish/repos","events_url":"https://api.github.com/users/breeswish/events{/privacy}","received_events_url":"https://api.github.com/users/breeswish/received_events","type":"User","site_admin":false},"labels":[{"id":717510430,"node_id":"MDU6TGFiZWw3MTc1MTA0MzA=","url":"https://api.github.com/repos/tikv/tikv/labels/C:%20Perf","name":"C: Perf","color":"d1fad7","default":false},{"id":1015578892,"node_id":"MDU6TGFiZWwxMDE1NTc4ODky","url":"https://api.github.com/repos/tikv/tikv/labels/S:%20LGT1","name":"S: LGT1","color":"66d7ee","default":false},{"id":305526947,"node_id":"MDU6TGFiZWwzMDU1MjY5NDc=","url":"https://api.github.com/repos/tikv/tikv/labels/T:%20Enhancement","name":"T: Enhancement","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2018-09-22T19:10:27Z","updated_at":"2019-01-03T01:58:06Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/tikv/tikv/pulls/3629","html_url":"https://github.com/tikv/tikv/pull/3629","diff_url":"https://github.com/tikv/tikv/pull/3629.diff","patch_url":"https://github.com/tikv/tikv/pull/3629.patch"},"body":"Signed-off-by: Breezewish <breezewish@pingcap.com>\r\n\r\n<!--\r\nThank you for contributing to TiKV! Please read TiKV's [CONTRIBUTING](https://github.com/tikv/tikv/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.\r\n-->\r\n\r\n## What have you changed? (mandatory)\r\n\r\nThis PR is a full rewrite for functions in `util/codec/number.rs` and `util/codec/bytes.rs`.\r\n\r\n1. Provide super efficient number encoders and decoders in `NumberCodec`, which does in-place encoding and decoding.\r\n2. Provide efficient `Write` style number encoders and `Read` style decoders in `BufferNumberEncoder` and `BufferNumberDecoder`, which supports position managements and is handy to use. They are simple wrappers over `NumberCodec`. However they are not as efficient as `NumberCodec` (but still faster than current implementation).\r\n3. Provide efficient ProtoBuf VarInt decoding implementation, which is ported from facebook/folly.\r\n4. Provide efficient encoders and decoders for mem-comparable bytes, which is original implemented in `util/codec/bytes.rs`.\r\n\r\nThis PR only provides new facilities, but does not change existing code to use this new efficient facility, which will be done in future PRs. The facility in this PR is implemented in a standalone workspace without depending on TiKV itself, so that it is easy to write more benchmarks for it in future. \r\n\r\n## What are the type of the changes? (mandatory)\r\n\r\n- Improvement (non-breaking change which is an improvement to an existing feature)\r\n\r\n## How has this PR been tested? (mandatory)\r\n\r\nUnit test.\r\n\r\n## Does this PR affect documentation (docs/docs-cn) update? (mandatory)\r\n\r\nNo\r\n\r\n## Does this PR affect tidb-ansible update? (mandatory)\r\n\r\nNo\r\n\r\n## Refer to a related PR or issue link (optional)\r\n\r\nhttps://github.com/tikv/tikv/issues/3345\r\n\r\n## Benchmark result if necessary (optional)\r\n\r\n![image](https://user-images.githubusercontent.com/1916485/46053370-15731c80-c175-11e8-96ed-c99340c3338a.png)\r\n![image](https://user-images.githubusercontent.com/1916485/46019232-32c0d000-c10e-11e8-940e-657b7c1b2719.png)\r\n![image](https://user-images.githubusercontent.com/1916485/46053628-3ee07800-c176-11e8-8448-06a6a783a4a9.png)\r\n"},"comment":{"url":"https://api.github.com/repos/tikv/tikv/issues/comments/451039124","html_url":"https://github.com/tikv/tikv/pull/3629#issuecomment-451039124","issue_url":"https://api.github.com/repos/tikv/tikv/issues/3629","id":451039124,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTAzOTEyNA==","user":{"login":"breeswish","id":1916485,"node_id":"MDQ6VXNlcjE5MTY0ODU=","avatar_url":"https://avatars3.githubusercontent.com/u/1916485?v=4","gravatar_id":"","url":"https://api.github.com/users/breeswish","html_url":"https://github.com/breeswish","followers_url":"https://api.github.com/users/breeswish/followers","following_url":"https://api.github.com/users/breeswish/following{/other_user}","gists_url":"https://api.github.com/users/breeswish/gists{/gist_id}","starred_url":"https://api.github.com/users/breeswish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breeswish/subscriptions","organizations_url":"https://api.github.com/users/breeswish/orgs","repos_url":"https://api.github.com/users/breeswish/repos","events_url":"https://api.github.com/users/breeswish/events{/privacy}","received_events_url":"https://api.github.com/users/breeswish/received_events","type":"User","site_admin":false},"created_at":"2019-01-03T01:58:06Z","updated_at":"2019-01-03T01:58:06Z","author_association":"MEMBER","body":"@brson Thanks! I agree with you. I was working on other stuff recently and I will polish this PR soon."}}
{"actor":{"display_login":"breeswish"}}