string literal vs array join

3 years ago
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Test name Executions per second
array.join 2590.5 Ops/sec
string literal 5183.7 Ops/sec
string concatenation 6919.6 Ops/sec
Script Preparation code:
Tests:
  • array.join

  • string literal

  • string concatenation

Open this result on MeasureThat.net