{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/21440","repository_url":"https://api.github.com/repos/akka/akka","labels_url":"https://api.github.com/repos/akka/akka/issues/21440/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/21440/comments","events_url":"https://api.github.com/repos/akka/akka/issues/21440/events","html_url":"https://github.com/akka/akka/pull/21440","id":176249554,"number":21440,"title":"=act clean up ByteString#drop(...)","user":{"login":"monkey-mas","id":5261677,"avatar_url":"https://avatars.githubusercontent.com/u/5261677?v=3","gravatar_id":"","url":"https://api.github.com/users/monkey-mas","html_url":"https://github.com/monkey-mas","followers_url":"https://api.github.com/users/monkey-mas/followers","following_url":"https://api.github.com/users/monkey-mas/following{/other_user}","gists_url":"https://api.github.com/users/monkey-mas/gists{/gist_id}","starred_url":"https://api.github.com/users/monkey-mas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monkey-mas/subscriptions","organizations_url":"https://api.github.com/users/monkey-mas/orgs","repos_url":"https://api.github.com/users/monkey-mas/repos","events_url":"https://api.github.com/users/monkey-mas/events{/privacy}","received_events_url":"https://api.github.com/users/monkey-mas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akka/akka/labels/needs-attention","name":"needs-attention","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-11T15:35:39Z","updated_at":"2016-09-24T06:21:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/21440","html_url":"https://github.com/akka/akka/pull/21440","diff_url":"https://github.com/akka/akka/pull/21440.diff","patch_url":"https://github.com/akka/akka/pull/21440.patch"},"body":"Current implementation has a good algorithm but seems a little bit complicated.\r\n\r\nClening-up does not suffer the performance (actually seems to have the better performance when dropping(N-1) where N is the length), and is easy to understand almost the same algorithm now.\r\n\r\n### Benchmark\r\nI measured the performance using sbt-jmh with this [code](https://gist.github.com/monkey-mas/1ea2f9c3ba5c7fe8fbd16cf1caf30c8f).  Benchmark code was executed with some parameters such as `-t1 -f2 -wi 10 -i 20`.\r\n\r\n#### Test environment\r\n```\r\nOS: Ubuntu 14.0.4 (Linux kernel version 3.13.0-95-generic)\r\nCPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz\r\nVM version: JDK 1.8.0_77\r\n```\r\n\r\n#### Before\r\n```\r\nBenchmark                         Mode  Cnt           Score          Error  Units\r\nDrop.drop_avg                   thrpt   40      560267.149 ±     4490.709  ops/s\r\nDrop.drop_best                  thrpt   40    11597871.354 ±    70215.754  ops/s\r\nDrop.drop_greater_or_eq_to_len  thrpt   40   924849361.936 ±  4149839.121  ops/s\r\nDrop.drop_negative              thrpt   40  1209035501.266 ± 18455513.298  ops/s\r\nDrop.drop_worst                 thrpt   40      235822.392 ±     6203.663  ops/s\r\n```\r\n\r\n#### After\r\n```\r\nDrop.drop_avg                   thrpt   40      563309.938 ±    5294.201  ops/s\r\nDrop.drop_best                  thrpt   40    11020064.756 ±  322643.144  ops/s\r\nDrop.drop_greater_or_eq_to_len  thrpt   40   922781749.091 ± 5329170.729  ops/s\r\nDrop.drop_negative              thrpt   40  1231164383.713 ± 9861870.265  ops/s\r\nDrop.drop_worst                 thrpt   40      317676.017 ±    1439.986  ops/s\r\n```"},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/249348349","html_url":"https://github.com/akka/akka/pull/21440#issuecomment-249348349","issue_url":"https://api.github.com/repos/akka/akka/issues/21440","id":249348349,"user":{"login":"monkey-mas","id":5261677,"avatar_url":"https://avatars.githubusercontent.com/u/5261677?v=3","gravatar_id":"","url":"https://api.github.com/users/monkey-mas","html_url":"https://github.com/monkey-mas","followers_url":"https://api.github.com/users/monkey-mas/followers","following_url":"https://api.github.com/users/monkey-mas/following{/other_user}","gists_url":"https://api.github.com/users/monkey-mas/gists{/gist_id}","starred_url":"https://api.github.com/users/monkey-mas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monkey-mas/subscriptions","organizations_url":"https://api.github.com/users/monkey-mas/orgs","repos_url":"https://api.github.com/users/monkey-mas/repos","events_url":"https://api.github.com/users/monkey-mas/events{/privacy}","received_events_url":"https://api.github.com/users/monkey-mas/received_events","type":"User","site_admin":false},"created_at":"2016-09-24T06:21:38Z","updated_at":"2016-09-24T06:21:38Z","body":"Review please :) If the commits are okay, I'll squash them!\r\n\r\n- fixed some tests\r\n- fixed private modifier\r\n- renamed methods and variables\r\n- added benchmark"}}
{"actor":{"display_login":"monkey-mas"}}