Tests:
-
String replaceAll
-
String replace with regex
-
String split and join
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Mac OS X 10.15.7
View result in a separate tab
String split and join
1.5M/s
String replace with regex
1.0M/s
View exact numbers
| Test name |
Executions per second |
|
✓
String split and join
|
1,518,089 Ops/sec |
|
String replace with regex
|
1,030,834 Ops/sec |
|
String replaceAll
|
882,599 Ops/sec |
Do you really want to delete benchmark?