Test case name | Result |
---|---|
Regex match count | |
Get replaced text length with regex | |
Get replaced text length with String.replaceAll() | |
Get replaced text length with String.split() | |
Calculate with String.split() | |
Calculate in simple for loop |
Test name | Executions per second |
---|---|
Regex match count | 959190.9 Ops/sec |
Get replaced text length with regex | 1961361.1 Ops/sec |
Get replaced text length with String.replaceAll() | 2762523.2 Ops/sec |
Get replaced text length with String.split() | 2737453.8 Ops/sec |
Calculate with String.split() | 3998123.0 Ops/sec |
Calculate in simple for loop | 187175.3 Ops/sec |