String.prototype.replace vs String.prototype.replaceAll vs String.prototype.split vs Array.prototype.map548,200 ops/sec
541,190 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| String.prototype.replace | |
| String.prototype.replaceAll | |
| String.prototype.split | |
| Array.prototype.map |
| Test name | Executions per second |
|---|---|
| ✓ String.prototype.replace | 560,344 Ops/sec |
| String.prototype.replaceAll | 548,200 Ops/sec |
| String.prototype.split | 522,349 Ops/sec |
| Array.prototype.map | 174,364 Ops/sec |