{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/5613","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/5613/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/5613/comments","events_url":"https://api.github.com/repos/netty/netty/issues/5613/events","html_url":"https://github.com/netty/netty/pull/5613","id":168586986,"number":5613,"title":"Removed custom split method as it is not effective anymore","user":{"login":"doom369","id":1536494,"avatar_url":"https://avatars.githubusercontent.com/u/1536494?v=3","gravatar_id":"","url":"https://api.github.com/users/doom369","html_url":"https://github.com/doom369","followers_url":"https://api.github.com/users/doom369/followers","following_url":"https://api.github.com/users/doom369/following{/other_user}","gists_url":"https://api.github.com/users/doom369/gists{/gist_id}","starred_url":"https://api.github.com/users/doom369/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doom369/subscriptions","organizations_url":"https://api.github.com/users/doom369/orgs","repos_url":"https://api.github.com/users/doom369/repos","events_url":"https://api.github.com/users/doom369/events{/privacy}","received_events_url":"https://api.github.com/users/doom369/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/netty/netty/labels/improvement","name":"improvement","color":"0052cc"}],"state":"closed","locked":false,"assignee":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"assignees":[{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/150","html_url":"https://github.com/netty/netty/milestones/4.0.41.Final","labels_url":"https://api.github.com/repos/netty/netty/milestones/150/labels","id":1906819,"number":150,"title":"4.0.41.Final","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":56,"closed_issues":10,"state":"open","created_at":"2016-07-27T10:23:08Z","updated_at":"2016-08-01T19:56:18Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-08-01T07:51:20Z","updated_at":"2016-08-01T19:56:18Z","closed_at":"2016-08-01T19:56:18Z","pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/5613","html_url":"https://github.com/netty/netty/pull/5613","diff_url":"https://github.com/netty/netty/pull/5613.diff","patch_url":"https://github.com/netty/netty/pull/5613.patch"},"body":"Motivation\r\n\r\nStarting from Java 7 method `String.split` in java [is optimized for splitting by single char string](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/java/lang/String.java#String.split%28java.lang.String%2Cint%29). Thus custom `StringUtil.split` method doesn't have any sense anymore. Even more - it slower than optimized java version.\r\n\r\nBenchmark results:\r\n```\r\nBenchmark                                                                                          (s)   Mode  Cnt      Score       Error   Units\r\nStringUtilPerfTest.customSplit                                                                      aw  thrpt   10  54943.557 ±  6337.244  ops/ms\r\nStringUtilPerfTest.customSplit                                                              someString  thrpt   10  44412.726 ±  5632.855  ops/ms\r\nStringUtilPerfTest.customSplit                                                someString:someParameter  thrpt   10   9412.291 ±  1062.826  ops/ms\r\nStringUtilPerfTest.customSplit                                  someString:someParameter:someParameter  thrpt   10   6626.128 ±   877.140  ops/ms\r\nStringUtilPerfTest.customSplit  someStringsomeStringsomeString:someParametersomeParametersomeParameter  thrpt   10   5655.373 ±   914.399  ops/ms\r\nStringUtilPerfTest.split                                                                            aw  thrpt   10  72180.120 ± 10025.371  ops/ms\r\nStringUtilPerfTest.split                                                                    someString  thrpt   10  61568.319 ±  9280.446  ops/ms\r\nStringUtilPerfTest.split                                                      someString:someParameter  thrpt   10   9796.448 ±  1103.540  ops/ms\r\nStringUtilPerfTest.split                                        someString:someParameter:someParameter  thrpt   10   7475.525 ±   863.184  ops/ms\r\nStringUtilPerfTest.split        someStringsomeStringsomeString:someParametersomeParametersomeParameter  thrpt   10   8538.443 ±   795.152  ops/ms\r\n```\r\n\r\nBenchmark : \r\n\r\n```\r\n@BenchmarkMode(Mode.Throughput)\r\n@OutputTimeUnit(TimeUnit.MILLISECONDS)\r\n@State(Scope.Thread)\r\n@Fork(1)\r\n@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)\r\n@Measurement(iterations = 10, time = 1, timeUnit = TimeUnit.SECONDS)\r\npublic class StringUtilPerfTest {\r\n\r\n    @Param({\"aw\", \"someString\", \"someString:someParameter\", \"someString:someParameter:someParameter\", \"someStringsomeStringsomeString:someParametersomeParametersomeParameter\"})\r\n    public String s;\r\n\r\n    @Benchmark\r\n    public String[] split() {\r\n        return s.split(\":\");\r\n    }\r\n\r\n    @Benchmark\r\n    public String[] customSplit() {\r\n        return StringUtil.split(s, ':');\r\n    }\r\n}\r\n\r\n```\r\n\r\nModifications:\r\nReplaced all occurrences of `StringUtil.split` with `String.split`."},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/236688864","html_url":"https://github.com/netty/netty/pull/5613#issuecomment-236688864","issue_url":"https://api.github.com/repos/netty/netty/issues/5613","id":236688864,"user":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T19:56:18Z","updated_at":"2016-08-01T19:56:18Z","body":"Cherry-picked into 4.0 (68ee85f1ae0c985cb59618d33416471c0320877a) and 4.1 (a80ea46b8e6d3b225547ae138a357101b0381268)"}}
{"actor":{"display_login":"normanmaurer"}}