Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
String concatenation vs array join #2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Browser:
Chrome 142
Operating system:
Windows
Device Platform:
Desktop
Date tested:
10 months ago
Benchmark engine:
Benchmark.js
String concatentation
564K/s
Array join (w/ push)
123K/s
Array join
121K/s
View exact numbers
Test name
Executions per second
✓
String concatentation
564,082 Ops/sec
Array join (w/ push)
123,128 Ops/sec
Array join
121,272 Ops/sec
Tests:
String concatentation
let str = ""; for (let i = 0; i < 1000; i++) { str += "String concatenation. "; }
Array join
let arr = []; for (let i = 0; i < 1000; i++) { arr[i] = "String concatenation. "; } str = arr.join("");
Array join (w/ push)
let arr = []; for (let i = 0; i < 1000; i++) { arr.push("String concatenation. "); } str = arr.join("");