Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:87.0) Gecko/20100101 Firefox/87.0
Firefox 87
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
concatenating with switch 969289.2 Ops/sec
regex replacement 2435140.5 Ops/sec
array joining 398633.0 Ops/sec
concatenating with object 267339.3 Ops/sec
concatenating with if 955004.9 Ops/sec
Script Preparation code:
Tests:
  • concatenating with switch

  • regex replacement

  • array joining

  • concatenating with object

  • concatenating with if