theigl opened a new pull request #456: URL: https://github.com/apache/wicket/pull/456
This PR optimizes `String.split` for cases where the target string contains the separator 0 or 1 times. **Branch** Benchmark | Mode | Cnt | Score | Units ------------ | ------------- | ------------- | --: | ------------- StringBenchmarks.split0 | thrpt | 6 | `235703729,811` | ops/s StringBenchmarks.split0:·gc.alloc.rate.norm | thrpt | 6 | `24,002` | B/op StringBenchmarks.split1 | thrpt | 6 | `24061051,457` | ops/s StringBenchmarks.split1:·gc.alloc.rate.norm | thrpt | 6 | `144,015` | B/op StringBenchmarks.split2 | thrpt | 6 | `12975064,228` | ops/s StringBenchmarks.split2:·gc.alloc.rate.norm | thrpt | 6 | `264,029` | B/op **Master** Benchmark | Mode | Cnt | Score | Units ------------ | ------------- | ------------- | --: | ------------- StringBenchmarks.split0 | thrpt | 6 | `52521639,542` | ops/s StringBenchmarks.split0:·gc.alloc.rate.norm | thrpt | 6 | `80,007` | B/op StringBenchmarks.split1 | thrpt | 6 | `13092471,610` | ops/s StringBenchmarks.split1:·gc.alloc.rate.norm | thrpt | 6 | `224,027` | B/op StringBenchmarks.split2 | thrpt | 6 | `9876483,822` | ops/s StringBenchmarks.split2:·gc.alloc.rate.norm | thrpt | 6 | `288,032` | B/op https://issues.apache.org/jira/browse/WICKET-6838 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org